I was looking through an old programming reference manual and one of
the "commands" was Macro name ... EndMacro. Anything in those keywords
became the macro name, and whenever you used that name later in your
code, the macro was inserted by the compiler. So basically it lets
you reduce your source size and also save typing.
For example, I use the line MessageBeep_(#MB_ICONASTERISK) a lot in my
own apps. I could declare this as a "macro" with the following, and at
compile time the compiler would replace !chime with the actual code.
(Obviously the leading exclamation point would have to be something
else, because that's already used for inline ASM, isn't it?).
Note: Don't confuse macros with procedures -- the two things are very
different and are used to achieve different goals... macros are more like
a highly streamlined version of the IncludeFile command, but without
requiring external files and longer typing.

Code: Select all
Macro chime
MessageBeep_(#MB_ICONASTERISK)
EndMacro
;
!chime ; Compiler uses MessageBeep_(#MB_ICONASTERISK) here.