Another CHOOSE example ---
'
' Usage of the Choose Instruction example
'
' Displays an indexed value
'
USES "MATH"
DIM RetNumber as DOUBLE
DIM Index as LONG
For Index = 1 TO 3
RetNumber = Choose (Index, Fun1, Fun2, Fun3)
msgbox 0,RetNumber
Next
Function Fun1()
Function = PI
End Function
Function Fun2()
Function = PI*2
End Function
Function Fun3()
Function = PI*3
End Function
Bookmarks