Select

Category: Keywords

Syntax:

Select:Void()



Returns

Void



Summary

Begins a multi-way branch statement that tests an expression against multiple values

View detailed documentation online



Example
Select day
    Case 1
        Print "Monday"
        Exit
    Case 6, 7
        Print "Weekend!"
        Exit
    Default
        Print "Another day"
        Exit
EndSelect

; Without Exit the code falls through: for 1 this prints "one" and then "two"
Select n
    Case 1
        Print "one"
    Case 2
        Print "two"
        Exit
EndSelect

BambooBasic © 2026 Michael Denathorn