Arc Macro Language (AML) Programming for Task-Oriented Customization

&setvar (or &sv, even &s) to assign a value to a variable (e.g., &s covername = ‘soil)s’
use the percent sign (%) as brackets to reference the variable (e.g., &type %covername%).
for variable assignment (e.g., &setvar device = [response ‘Enter a station file’].).br> direct use (e.g., SHADESET [getchoice color bw -prompt ‘Select Color or B/W shades:’].

(&args dev; &station %dev%; ARCPLOT; &return ® saved as ex4.aml)

&IF <logical_expression> &THEN <statement> &ELSE <statement>

[null %variable%] - evaluating a variable and returning a Boolean value (i.e., .TRUE. or .FALSE.).

the &DO ... &END block for executing several statements as a result of some logical expression.

&TYPE [show pagesize] => showing the maximum x, y coordinates of the page

&TYPE [extract 1 [show pagesize]]; &TYPE [extract 2 [show pagesize]]

&DO index := 1 &TO 10
&RUN operation.aml /* perform some operation 10 times
&END
&DO &WHILE not %done%
&RUN operation.aml; &setvar done := [query ‘Do you want to quit’ .true.]
&END
&sv color = 0
&DO coverage &LIST ROADS SREAMS CONTOURS
&sv color = %color% + 1
LINECOLOR %color%
ARCS %coverage%
&END