However I'm stuck at an early stage, trying to determine the type of the argument.
The builtin Debug statement accepts both strings and numeric values, and both variables and literals.
I'm trying to replicate that, but I'm not sure if that's possible...
Code: Select all
Macro rtdebug (x)
Select TypeOf(x)
Case #PB_String
Debug "X"
Case #PB_Integer
Debug "Y"
EndSelect
EndMacro
a.i = 5
b.s = "hello"
RTDebug ( a) ;; ok
RTDebug ( b) ;; ok
RTDebug ( 3) ;; error
RTDebug ( "ab") ;; error