Macro substitution would be very easy to implement as a pre-parser pass but
this would not provide run-time evaluation of run-time generated statements
(e.g expressions typed in by the user or the example given by Fran�ois Van
Emelen).

Preprocessor macros, however, provide a great way of writing C programs so
that they are not nearly undecipherable as usual, but totally
incomprehensible.

Tony Tebby


----- Original Message -----
From: "Timothy Swenson" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: mercredi 19 f�vrier 2003 05:50
Subject: Re: [ql-users] Sbasic and macro substitutions


>
> I don't believe there is a way of performing macro substitution in S*BASIC
> programming.  Now, it can probably be implemented in one form or another.
>
> The most obvious is a pre-processor that takes a macro and expands it
> before the program is actually sent to a compiler or parser.  C has a
> pre-processor that does exactly this.
>
> Another way to do it is to create a macro in a text editor that does the
> substitution for you.  Either as a form of pre-processor, or as a keyboard
> shortcut.
>
> I don't think it is possible inside S*BASIC, as this would require a
change
> in the S*BASIC code.
>
> Structured SuperBasic (SSB) is a form of pre-processor that does things
> like conditional compilation (IF DEF's), combining S*BASIC modules into
one
> program (#INCLUDE statement), and so on.  Some form of substitution could
> be implemented.  If you feel adventure some, the SSB source code comes in
> the package and you can take it as a start and go from there.
>
> Tim Swenson
>

Reply via email to