Harbour Macro compiler

Invoking the macro compiler:

      &variable     
      or                               
      &( expression )               
      or                               
      &variable.text

Description

The Harbour Macro Compiler offers 2 additional layers of functionality controlled by means of hb_SetMacro()* function, not available in CA-Cl*pper.

hb_SetMacro( HB_SM_HARBOUR, .T. ) will enable macro compilation and evaluation of complex expressions not supported by CA-Cl*pper like:

- exp++, exp--, var += exp, (exp), etc..
- Nested codeblocks.
- Expressions longer then 254 characters.

hb_SetMacro( HB_SM_XBASE, .T. ) will enable macro compilation and evaluation of comma separated lists in all contexts where lists are acceptable by CA-Cl*pper*, including:

- { &cMacro } // Literal array elements list.
- SomeArray[ &cMacro ] // Array index list.
- SomeFun( &cMacro ) // Arguments list.
- ( &cMacro ) // parenthesized list expression.

*CA-Cl*pper only supports list macros within codeblocks context.

Both these extra layers are activated by default.

* See also -k Compiler switch.

Seealso

hb_SetMacro()

Advertisements

2 responses to “Harbour Macro compiler

  1. Pingback: Harbour In General | Viva Clipper !

  2. Pingback: Harbour RG Summary | Viva Clipper !

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s