(Added a link to test version of BAM in the OP.)
Here's a sample use case and test program for BETWEEN, CHOOSE, and IFF:
Here's a sample use case and test program for BETWEEN, CHOOSE, and IFF:
Code: (Select All)
' Test BETWEEN, CHOOSE, IFF
hour$ = left$(time$,2)
again:
language%=_PROMPT("Select your preferred language:" + chr$(13) + chr$(13) + "1 -> English, 2 -> Francais, 3 -> Espanol." + chr$(13) + chr$(13) + "Or Cancel to end." , "" )
IF NOT BETWEEN( language%, 1, 3 ) THEN END
_Greeting:
PRINT IFF( BETWEEN( hour$, 0, 11 ), _
CHOOSE( language%, "Good Morning", "Bonjour", "Buenos Dias" ), _
IFF( BETWEEN( hour$, 12, 4), _
CHOOSE( language%, "Good Afternoon", "Bon apres-midi", "Buenas Tardes" ), _
CHOOSE( language%, "Good Evening", "Bonsoir", "Buenas Noches" ) ) )
_delay 3
goto again