AMOSi:Else If

From Amiga Coding
Revision as of 01:50, 17 November 2007 by Spellcoder (talk | contribs) (1 revision(s))
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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"
Else
   Print "Other values..."
End If

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