Code: Select all
Procedure.d MyProcedure(a,b,c)
Macro _MyProcedure(a,b,c)
(a+b+c)*0.333333
EndMacro
ProcedureReturn _MyProcedure(a,b,c)
EndProcedure
Debug MyProcedure(10,20,30)
Debug _MyProcedure(10,20,30)
I don't really like doing this, but I think since it's a pre-processor thing I'm dealing with, the code isn't actually as dirty as having the macro outside the procedure (because then it becomes messy to update, etc... at least it happened to me).
This way you can decide whether you want to call as a macro or as a procedure.
The only limitation is with multi-line code... due to the fact that PB macro instructions are quite limited as of V4.1x -still...