04-16-2010, 10:11 PM
programandala.net Wrote:Anyway this does what I need:This is a very good idea in fact, since chr(18,1,62,18,0,8) will be evaluated in *compile time* (not during run-time) and converted to a string. The compiler does string-folding optimization, so multiple occurrences of the same string in the program will map to the same memory region. This is the best way to do a const string :!:. I can add CONST a$ = ... syntax sugar if you want, but it will be translated into a macro like this.
#define prompt chr(18,1,62,18,0,8)
A compile time macro is not the same thing than a language constant, but it works.
(By the way, I miss a help forum to post doubts. "Wish list", "bug reports" and "how-tos" are not suitable for that.)