Page 2 of 2

Re: Macro for Thread ?

Posted: Thu Sep 09, 2021 12:05 pm
by danielmaximiliano
Hi Jimmy: you've been through this before, you need to call a function or procedure to start a thread. As I misinterpreted I couldn't help him properly.


harbour explains its documentation

Macro Operator (runtime compiler)

One of the most powerful features of xBase languages is the 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 expression 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 pre-process before compile.

Syntax:

&( ... )

The text value of the expression '...' will be compiled, and the value resulting from the execution of the compiled code is the result.

&SomeId