Macros
Macros are commands within the code that allow for customization of the Lua++ compiler’s behavior. To use a macro one would use the --!
prefix followed by the name of the macro. These macros must be the first statement of the program. Otherwise, the compiler will throw an error. Here are some examples:
--!<macro>
print("hello")
The following segment will not compile successfully as there is a statement preceding the macro definition:
local v = 1 -- NO
--!<macro>
print("hello")
Last updated
Was this helpful?