MilindV
15th January 2009, 08:20
HI ALL
I have a simple query, can i give message in macro definition?
Please refer to following code.
#define WRITEERR(...) type = get.arg.type(1)
^ if type = 3 then
^ ret.long = get.long.arg(1)
^ if ret.long <> 0 then
^ message("ERROR")
^ endif
^ else
^ ret.str = get.string.arg(1)
^ if isspace(ret.str) then
^ message("ERROR")
^ endif
^ endif
I have also tried using mess() but not working.
I have also declared all variables used in macro before macro definition.
Another doubt is, can I access macro args same as function args?
which I have tried in this case.
I am calling this macro in a function as
WRITEERR(7) |* any numeric value as arg.
or
WRITEERR("")
Thanks All
MilidnV
I have a simple query, can i give message in macro definition?
Please refer to following code.
#define WRITEERR(...) type = get.arg.type(1)
^ if type = 3 then
^ ret.long = get.long.arg(1)
^ if ret.long <> 0 then
^ message("ERROR")
^ endif
^ else
^ ret.str = get.string.arg(1)
^ if isspace(ret.str) then
^ message("ERROR")
^ endif
^ endif
I have also tried using mess() but not working.
I have also declared all variables used in macro before macro definition.
Another doubt is, can I access macro args same as function args?
which I have tried in this case.
I am calling this macro in a function as
WRITEERR(7) |* any numeric value as arg.
or
WRITEERR("")
Thanks All
MilidnV