' Theremino Automation
' Demo program for "Select/Case/EndSelect"
' Use SlotViewer to set Slots 1 and 2 with values 1 and 2

Button 1 Text Loop1
Button 2 Text Loop2
Stop

Label Loop1
	Select Slot(1)
		Case 1
			Beep
		Case 2
			Beep
		CaseElse
			Beep
	EndSelect
Goto Loop1

' This demonstrates that "Select" could also be nested
' and that you can also use expressions
Label Loop2
	Select Slot(1)
		Case 1
			Beep
			Select Slot(2)
				Case 1
					Beep
				Case 6 - 4
					Beep
					Beep
			EndSelect
		Case Slot(3) - 1
			Beep
			Beep
	EndSelect
Goto Loop2

' The Select instruction is case insensitive. 


'WATCH Slot(1)
'WATCH Slot(1) * 5
'WATCH sqrt(Slot(1))
'EXEC Slot 1 = 2
