Blocks
A basic unit of MGS Natlang structure.
The contents (body) of each MGS Natlang block is enclosed in a pair of matching curly braces:
BLOCK DECLARATION { BLOCK BODY }
Some block types can (or must) be nested within others. Note that blocks cannot be nested arbitrarily.
Block Types
The following list includes all block nesting relationships.
Indented entries can only be used within the parent's block body. Unindented entries occur at the document root level. Items in parentheses are not blocks themselves, but are used only inside their parent block's contents.
- Dialog Settings Block:
settings (for) dialog {}
- Dialog Settings Target Block:
<TARGET> {}
- Dialog Settings Target Block:
- Serial Dialog Settings Block:
settings (for) serial dialog {}
- Dialog Block:
dialog $string {}
- (Dialogs)
- Serial Dialog Block:
serial dialog $string {}
- Script Block:
$string {}
(Macros are not included in the list above.)
Combination Blocks
Inside an MGS Natlang script block, some actions can be combined with their associated definition block. In other words, you can "call" a dialog or serial dialog and define it in place.
For combination blocks of all types, a dialog name (string) is optional. Omitting dialog names is recommended to keep things clean.
Blocks that can be combined:
- SHOW_DIALOG + Dialog Block = Show Dialog Block
- SHOW_SERIAL_DIALOG + Serial Dialog Block = Show Serial Dialog Block
#verifyme -- what about concat serial dialog
and set serial connect message
? Do they have combination blocks, too?