next up previous index
Next: A larger FWEB example Up: Annotating Codes with FWEB Previous: FWEB comments

    
FWEB preprocessor

Numeric labels of Fortran can be replaced with the #:0 construct:

@n9[-n/]
@
@m DONE #:0 // Symbolic statement label in FORTRAN.
@a
     goto DONE
     ...
DONE:

@#ifdef
same as #ifdef in CPP, equivalent to
@#if defined
@#ifndef
same as #ifndef in CPP, equivalent to
@#if !defined
@#if
@#elif
@#else
@#endif
same as the corresponding conditional code generation constructs in CPP

Macros can be defined on the command line using the -m switch to ftangle and fweave, e.g., -mA(x)=x on the command line is equivalent to @mA(x) x in the FWEB file. This allows for conditioning the generated code from a Makefile.


next up previous index
Next: A larger FWEB example Up: Annotating Codes with FWEB Previous: FWEB comments
Zdzislaw Meglicki
2001-02-26