I am working with a class, and i need to make conversions for all datatypes (a class for associative arrays), but, writing code for each class method would be too tedious. So, i was thinking i could generate methods with macros... and i ran across this error:
Basically what i am trying to do is generate apointer method, a getter and a setter, this is the macro code:
And i am invoking it like this:
The macro is being invoked from within the INTERFACE body of a class... like this:
Am i doing something wrong or is it an error from PowerBASIC?
Code:
MACRO ASC_PLB_VAR_HANDLER(DT,GS,PT,TP) METHOD PT(BYVAL k AS STRING) AS DWORD END METHOD PROPERTY GET GS(byval k as string) AS DT END PROPERTY PROPERTY SET GS(byval k as string, BYVAL v AS DT) END PROPERTY END MACRO
Code:
ASC_PLB_VAR_HANDLER(INTEGER,sInt,pInt,1)
Code:
CLASS PluriBASIC_Associative_Class INTERFACE PluriBASIC_Associative_Interface INHERIT IUNKNOWN ASC_PLB_VAR_HANDLER(INTEGER,sInt,pInt,1) END INTERFACE END CLASS
Comment