| 1 |
HI04: This example shows how FunnelWeb's macro facility can be used to |
| 2 |
fudge a multi-way conditional. |
| 3 |
|
| 4 |
@O@<hi04.out@>==@{@<Main code@>@} |
| 5 |
|
| 6 |
@A This module contains non-portable code that must execute on Hewlett |
| 7 |
Packard, Sun, and DEC workstations. The following FunnelWeb macro is |
| 8 |
defined to choose between these three. The first parameter is the HP code, |
| 9 |
the second is the Sun code, and the third is the DEC code. Whichever |
| 10 |
parameter constitutes the body of this macro determines which |
| 11 |
machine the code is being targetted for. |
| 12 |
|
| 13 |
@$@<Machine specific code@>@(@3@)@M==@{@1@} @! Configure for HP. |
| 14 |
|
| 15 |
@$@<Main code@>==@{@- |
| 16 |
------- |
| 17 |
@<Machine specific code@>@( |
| 18 |
@"get_command_line(comline)@" @, @! HP. |
| 19 |
@"scan_command_line(128,comline);@" @, @! Sun. |
| 20 |
@"dcl_get_command_line(comline,256);@" @) @! DEC. |
| 21 |
|
| 22 |
------- |
| 23 |
@} |