#MACRO...#ENDMACRO


Preprocessor directive to define a multiline macro

Syntax:
#macro identifier( [ parameters ] )
body
#endmacro

#macro identifier( [ parameters, ] variadic_parameter... )
body
#endmacro

Description:
#macro is the multi-line version of #define.

Examples:
'' macro as an expression value
#macro Print1( a, b )
  a + b
#endmacro

Print Print1( "Hello", "World" )

'' Output :
'' Hello World!


'' macro as multiple statements
#macro Print2( a, b )
    Print a;
    Print " ";
    Print b;
    Print "!"
#endmacro

Print2( "Hello", "World" )

'' Output :
'' Hello World!


Differences from QB:
See also:
Back to Preprocessor
Valid XHTML :: Valid CSS: :: Powered by WikkaWiki



sf.net phatcode