RossNet

FunnelWeb

Reference

Developer

Tutorial
1 Introduction
2 Macros
3 Typesetting
4 Example
5 Hints
6 Examples
7 Webmaking

SEARCH
FunnelWeb Tutorial Manual

2.7 Macro Expansion

One of the strengths of FunnelWeb is that, when writing product files, it does not attempt to evaluate any text expression (e.g. text block, parameter, macro call) in memory and then write the result out. Instead, it always writes out what it is expanding dynamically and directly. This means that you need not fear defining macros that expand to huge amounts of text and then calling those macros in other macros, or passing those huge macros as parameters to other macros. In all cases, FunnelWeb expands directly to the product file, and there can be no danger in running out of memory during expansion (except for running out of stack space and other marginally used resources in pathological cases).

The only thing to remember in this regard is that FunnelWeb always stores the entire input  file and all included files, in their entirety in memory, for the duration of the run.

Here is an example, that illustrates how robust FunnelWeb is:

@! FunnelWeb copes well with the following
@! macro definitions. (Providing that it has
@! a little over ten megabytes of memory).

@O@<woppa.txt@>==@{@-
@<Quote@>@(@<Humungeous@>@)@+@}

@$@<Quote@>@(@1@)==@{"@1"@}

@$@<Humungeous@>==@{@-
...Ten Megabytes of Text...
@}

Prev Up Next


Webmaster    Copyright © Ross N. Williams 1992,1999. All rights reserved.