Harbour (programming language): Difference between revisions

Content deleted Content added
language
Line 71:
 
===Macro operator (runtime compiler)===
One of the most powerful features of xBase languages is the [[Macro (computer science)|Macro]] Operator '&'. Harbour's implementation of the Macro Operator allows for runtime compilation of any valid Harbour expression. Such a compiled expression may be used as a VALUE, i.e. the right side of an assignment (rvalue), but such a compiled expressionor may be used to resolve the left side (lvalue) of an assignment, i.e. private, or public variables, or a database field.
 
Additionally, the Macro Operator may compile and execute function calls, complete assignments, or even list of arguments, and the result of the macro may be used to resolve any of the above contexts in the compiled application. In other words, any Harbour application may be extended and modified at runtime to compile and execute additional code on-demand.
 
The latest Macro compiler can compile any valid Harbour code including code to per-process before compile.
Line 135:
{{mono|LOCAL}} and {{mono|STATIC}} are resolved at compile time, and thus are much faster than {{mono|PRIVATE}} and {{mono|PUBLIC}} variables which are dynamic entities accessed by means of a runtime [[Symbol table]]. For this same reason, {{mono|LOCAL}} and {{mono|STATIC}} variables are {{mono|not}} exposed to the Macro compiler, and any macro code which attempts to reference them will generate a runtime error.
 
Due to the dynamic nature of {{mono|PRIVATE}} and {{mono|PUBLIC}} variables, they can be created and destroyed at runtime, and can be accessed and modified by means of runtime macros, and can be accessed and modifiedor by Codeblocks created on the fly.
 
=== Control structures ===
The basic control structures include all of the standard [[dBase]], and [[Clipper (programming language)|Clipper]] control structures as well as additional ones inspired by the [[C (programming language)|C]] or [[Java (programming language)|Java]] programming languages: