compile error using a macro name
Posted: Thu Sep 14, 2017 10:51 am
I can't believe I haven't run across this before, but it appears that if you happen to use a macro name inside a quoted text string the compiler generates an error.
I use macros all over the place but it seems I haven't run afoul of this until now!
Code: Select all
macro test(b)
if (b = 0) then
PORTD.3 = 0
endif
end macro
// using a macro name inside a quoted string generates
// "Error: Unable to locate a macro with these number of arguments" or
// "Error: Invalid expression", depending on the macro
// all of these fail
const cstr = "this is a test"
dim s as string
s = "test"
s = "this is a test"