# Macros

Macros are used to execute one or more TCL commands and
are stored in the master dictionary with the name of the macro as
the item-ID.

When the macro name is entered at TCL, it can be followed
with any number of parameters. These parameters are added to the end
of the first TCL command in attribute 2 as additional language elements
and then passed for processing.

The macro functionality is provided
for a simple TCL procedure language. In general, a complex procedure
should be written as a FlashBASIC program.

The first line of
a macro must contain the character `m` (modify mode)
or `n` (nonstop mode). Each subsequent line is considered
a TCL command to be executed.

If the `m` code
is used in the first attribute of the macro, the TCL command displays
so that changes can be made to the TCL command. If `n` is used, the macro runs immediately.

macro comments can be
added, preceded by a space after the macro code on attribute 1. Comments
on following lines can be added by using the rem statement.

Additional values stored in an attribute are used
as stacked input to the TCL command in the first value.

Macros
can be created by using the Update processor or the create-macro command. The create-macro command takes the last
statement entered at TCL and converts it to a macro.

Warning: An m-type macro must be enclosed in quotation marks
when being edited or accessed through the Update processor.

## See also

- [! command](https://d3codex.com/tcl/exclamation-command/)
- [Account](https://d3codex.com/definitions/account-glossary/)
- [create-macro command](https://d3codex.com/tcl/create-macro-command/)
- [dm macro](https://d3codex.com/tcl/dm-macro/)
- [list-abs macro](https://d3codex.com/tcl/list-abs-macro/)
- [list-macros macro](https://d3codex.com/tcl/list-macros-macro/)
- [Logon procs and macros](https://d3codex.com/proc/logon-procs-and-macros/)
- [Options (Access Query Language)](https://d3codex.com/access/options-access-query-language/)
- [Paragraph](https://d3codex.com/tcl/paragraph/)
- [prompt statement](https://d3codex.com/tcl/prompt-statement/)
- [rem statement](https://d3codex.com/pickbasic-flashbasic/rem-statement/)

---
Source: https://d3codex.com/definitions/macros-glossary/ - part of the D3Codex reference.
