DEFINEmacro_name([argument[/argument]…])…body…!ENDDEFINE.
Each argument takes the following form:
{!arg_name=|!POSITIONAL} [!DEFAULT(default)] [!NOEXPAND] {!TOKENS(count)|!CHAREND('token')|!ENCLOSE('start' | 'end')|!CMDEND}
The following directives may be used within body:
!OFFEXPAND !ONEXPAND
The following functions may be used within the body:
!BLANKS(count)!CONCAT(arg…)!EVAL(arg)!HEAD(arg)!INDEX(haystack,needle)!LENGTH(arg)!NULL!QUOTE(arg)!SUBSTR(arg,start[,count])!TAIL(arg)!UNQUOTE(arg)!UPCASE(arg)
The body may also include the following constructs:
!IF (condition) !THENtrue-expansion!ENDIF!IF (condition) !THENtrue-expansion!ELSEfalse-expansion!ENDIF!DO!var=start!TOend [!BYstep] body!DOEND!DO!var!IN(expression)body!DOEND!LET!var=expression