Blitz3D Docs -> 2D - A-Z -> D -> Default
Description:In a SELECT structure, you may wish to execute code if none of the cases you specify are met. All code after DEFAULT to END SELECT will be executed if no case is met. See SELECT, CASE, and the example for more.
See also: Select, Case, End Select.
Example:[bbcode]; SELECT/CASE/DEFAULT/END SELECT Example
; Assign a random number 1-10
; Start the selection process based on the value of 'mission' variable
; Is mission = 1?
Print "Your mission is to get the plutonium and get out alive!"
; Is mission = 2?
Print "Your mission is to destroy all enemies!"
; Is mission = 3?
Print "Your mission is to steal the enemy building plans!"
; What do do if none of the cases match the value of mission
Print "Missions 4-10 are not available yet!"
; End the selection process
Blitz3D Manual Forum
BlitzPlus Equivalent Command
|Blitz BASIC Founders Fund|