#### Code Sample of Else / End Else

Consider the following example that asks the user if he or she would like measure a point feature.

C1= COMMENT/YESNO,Would you like to measure the point feature, PNT1? Clicking No measures the next feature.

IF/C1.INPUT=="YES"

PNT1=FEAT/POINT,RECT

…

…

ENDMEAS/

END_IF/

ELSE

PNT2=FEAT/POINT,RECT

…

…

ENDMEAS/

ENDELSE

Explanation of Sample Code

C1=COMMENT/YESNO
This line takes and stores the YES or NO response from the user.

IF/C1.INPUT=="YES"
This line is the expression. It tests to see if the input of comment 1 is a YES. If it's a YES then the IF statement is TRUE and continues executing the statements after the IF statement, in this case it measures the PNT1 feature. If NO it moves to the END_IF statement.

END_IF
This line ends the execution of commands inside the IF / END IF block of code. Any command following this line is where PC-DMIS will go to if the user clicks No at the comment.

ELSE
If the above IF / END IF block evaluates to false then command lines falling after this line and before the ENDELSE line will be executed. In this case, PNT2 gets executed.

ENDELSE
This line ends the execution of commands inside the ELSE / ENDELSE block of code.