AMOSi:Else If

From Amiga Coding
Jump to: navigation, search

an example can be found on AMOSPro_Examples:Examples/H-1/Help_11.AMOS

This is used inside an IF..ENDIF or IF..ELSE..ENDIF structure. It performs a test, and if it's true, executes all the AMOS commands until the next ELSEIF, ELSE or ENDIF statement.

If A=1
   Print "A=1"
Else If A=2
   Print "A=2"
Else If A=3
   Print "A=3"
   Print "Other values..."
End If

Note that you CAN'T use an ELSEIF between the ELSE and ENDIF section.