hb_SetMacro()

hb_SetMacro()

Enable/disable the macro compiler runtime features.

Syntax

      hb_SetMacro( <nOption>,  [<lOnOff>] ) --> <lOldSetting>

Arguments

<nOption> One of the HB_SM_* constants defined in set.ch.

<lOnOff> .T. to enable or .F. to disable a feature

Returns

hb_SetMacro() return the old state of requested feature.

Description

This function enables or disables some features of the macro compiler. The Harbour is extending the macro features compared to an original set available in CA-Cl*pper. Enabling/disabling some of them allows to keep strict CA-Cl*pper compatibility.

Available features are:

HB_SM_HARBOUR – enables harbour extensions: operators: ++, –, +=, -=, *=, /=, ˆ= objects: assigments to an instance variable

HB_SM_XBASE – enables other Xbase++ dialects extensions: expanding of expresions lists

HB_SM_SHORTCUTS – enables optimized evaluation of logical operators (.and., .or.)

HB_SM_PREPROC – enables preprocessing of commands This is meaningfull if Harbour is compiled with HB_MACRO_STATEMENTS flag

Examples

      INIT PROCEDURE IWANTCLIPPER()
         hb_SetMacro( HB_SM_HARBOUR,  .F. )
         hb_SetMacro( HB_SM_XBASE,  .F. )
         RETURN

Compliance

Harbour

Platforms

All

Files

Header file is set.ch
Library is core

Seealso

Macro compiler

Advertisements

4 responses to “hb_SetMacro()

  1. Pingback: How I can check validity of a macro ? | Viva Clipper !

  2. Pingback: Harbour All Functions – H | Viva Clipper !

  3. Pingback: Harbour Macro Functions | Viva Clipper !

  4. 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