Preprocessor - Macros (Luna)

Implemented as of Version2015.r1
Declaration
  • #Macro Identifier[(parameter1, parameter2, ..)]
    • (Luna-Code/Macro call)
  • #EndMacro
Parameter access in the macro
  • @parameter1 = Parameter1
  • @parameter2 = Parameter2
  • [..]

Example

This declares a macro that excepts 2 parameters.

#macro muladd(arg1,arg2)
  @arg1 = @arg1*@arg2+@arg2
#endmacro

Use in Luna-Source:

dim a,b as word
 
muladd(a,b)