Contents|Index|Previous
Alternate
macro syntax
If
you specify -a
or --alternate
on the GASP command line, the preprocessor uses somewhat different syntax.
This syntax is reminiscent of the syntax of Phar Lap macro assembler, but
it is not meant to be a full emulation of Phar Lap or similar assemblers.
In particular, GASP does not support directives such as DB
and IRP,
even in alternate syntax mode.
In
particular, -a
(or --alternate)
elicits the following differences.
- Preprocessor directives
You can use GASP preprocessor directives without a leading ‘.’
dot. For example, you can write SDATA
with the same effect as .SDATA.
- LOCAL
One additional directive, LOCAL,
is available. See Defining
your own directives for an explanation of how to use LOCAL.
- String delimiters
You can write strings delimited in the following alternate ways besides
"string":
- 'string'
You can delimit
strings with single-quote charaters.
- <string>
You can delimit
strings with matching angle brackets.
- Single-character string
escape
To include any single character literally in a string (even if the character
would otherwise have some special meaning), you can prefix the character
with !
(an exclamation mark). For example, you can write ‘<4.3
!> 5.4!!>’
to get the literal text, 4.3
> 5.4!.
- Expression results
as strings
You can write ‘%
expr’
to evaluate the expression, expr,
and use the result as a string.