Difference between revisions of "AMOSi:Else If"

From Amiga Coding
Jump to: navigation, search
m (1 revision(s))
 
(Extracted from the AMOSPro V2.00 helpfile)
(No difference)

Revision as of 02:45, 17 November 2007

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"
Else
   Print "Other values..."
End If

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