-
Character Set
-
Internationalization
Use $ZCONVERT() rather than $TRANSLATE() / $ZTRANSLATE() for case conversion.
-
Alias Variables and Containers
-
Parameter Passing
-
Naked References
-
Entryrefs
-
Lines with multiple commands
-
Lines Width
Limit lines to no wider than 132 columns.
Note The line oriented nature of M means that sometimes a single long line can be more readable than a block of code. Such occasional long lines are permissible where so justified.
-
Error Handling
-
Transaction Processing
-
BREAK
-
Argumentless Do
Leave a space between the last level indicator (li) and the first command or a comment delimiter.
-
GOTO and ZGOTO
-
HALT, QUIT, and HALT
Use ZHALT to return an invocation to the shell that the termination is abnormal.
-
LOCK, ZALLOCATE, and ZDEALLOCATE
-
NEW
-
READ
-
SET
-
XECUTE, Indirection, $ZSYSTEM and PIPE device commands
-
Else
-
Post conditionals
-
$ZDATA() and $DATA()
Use $ZDATA() rather than $DATA() unless the logic needs to ignore alias implications.
-
$Increment
-
$Next
-
$Piece()
-
$Random()
-
$ZPREVIOUS()
-
$ETrap vs. $ZTRAP
Use $ETRAP rather than $ZTRAP unless there are good reasons not to.
-
$KEY vs. $ZB
-
$STack vs. $ZLEVEL
-
$ZCMDLINE
Validate all input from $ZCMDLINE as if it were from a READ for user input.
-
Extrinsic Functions and Special Variables ($$)
-
Triggers
Except when using triggers for debugging, use journaling any region that uses triggers.
-
Call-in/Call-outs
-
Autorelink