Programmer's WorkBench (pwb.hlp) (
Table of Contents;
Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software,
purely for historical purposes.
If you're looking for up-to-date documentation, particularly for programming,
you should not rely on the information found here, as it will be woefully
out of date.
Defining Macros (Macro Syntax)
◄Up► ◄Contents► ◄Index► ◄Back►
─────Programmer's WorkBench─────────────────────────────────────────────────
PWB uses the following line-oriented syntax for defining macros.
Macros can be defined in the TOOLS.INI file or interactively by
using the Assign function or by recording.
See: Assign, ◄TOOLS.INI► ◄Tagged Sections in TOOLS.INI►
◄Macro Recording►
Syntax
name := definition
<name> Name of the macro being defined.
:= Macro-definition directive.
<definition> List of functions, macros, strings, and directives
that define the macro.
The name can use any character other than the colon, semicolon,
and white-space characters. Macros are not case sensitive. The
name cannot be any of the following directives:
:= :> => +> -> < <y <n
Other than these directives, there are no reserved words. You can
use any name. Macros defined by PWB or a PWB extension generally
begin with '_pwb' but there are exceptions.
White space in a definition is significant only to separate one
element from another. Use white space freely to make your
definitions readable. A definition can be placed on multiple lines
by using TOOLS.INI line continuations.
See: ◄Backslash: TOOLS.INI Line Continuation►
Macros can call PWB functions, extension functions, and other
macros. You can use a name in a macro definition before it is
defined, but all macros must be defined before they can be
executed. PWB calls functions and macros by name at run time.
That is, PWB uses late (dynamic) binding. You can change a macro's
behavior by redefining the called macros.
NOTE: Macros can be nested to a maximum depth of 20 calls. This
limit makes recursion impractical in most situations.
See
◄Macro Conditionals (Looping)►
◄Macro Prompt Directives►
◄Macro Recording►
◄Macro String Syntax►
◄Tagged Sections in TOOLS.INI►
-♦-