Allows for different macros to be called depending on the number of arguments. When macros are being expanded they are temporarily renamed with "__[num-args]".
Will cause an 'duplicate macro' error if the new name matches a pre-existing macro.
For example:
on init
test_macro()
test_macro(a,b,c)
end on
macro test_macro
message("macro with 0 arguments")
end macro
macro test_macro(#name#, #x#, #y#)
message("macro with 3 arguments")
end macro
\/ Goes to...
on init
test_macro__0()
test_macro__3(a,b,c)
end on
macro test_macro__0
message("macro with 0 arguments")
end macro
macro test_macro__3(#name#, #x#, #y#)
message("macro with 3 arguments")
end macro
\/ Expands to...
on init
message("macro with 0 arguments")
message("macro with 3 arguments")
end on
Allows for different macros to be called depending on the number of arguments. When macros are being expanded they are temporarily renamed with "__[num-args]".
Will cause an 'duplicate macro' error if the new name matches a pre-existing macro.
For example:
\/ Goes to...
\/ Expands to...