October 30, 2025, 08:54:25 AM

News:

Own IWBasic 2.x ? -----> Get your free upgrade to 3.x now.........


Eventual #define syntax

Started by Parker, January 11, 2006, 06:29:55 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Parker

#define at the current time only allows us to define a symbol, and set its value if we want. And the value can only be an integer. Will there be a time eventually when we can do something like this:
#define VALUE ((x+1)/x)
writeln(str$(VALUE));

Something where it would just store those tokens and do a replacement like a C compiler does? This way you can even store partial statements and not get an error, instead of having it try to parse them when it sees a #define. I don't know how it works right now though, so I don't know how much changing that would require.