Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
42
Task/Jump-anywhere/QB64/jump-anywhere.qb64
Normal file
42
Task/Jump-anywhere/QB64/jump-anywhere.qb64
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
' Jumps in QB64 are inherited by Qbasic/ QuickBasic/ GWBasic
|
||||
' here a GOTO demo of loops FOR-NEXT and WHILE-WEND
|
||||
|
||||
Dim S As String, Q As Integer
|
||||
Randomize Timer
|
||||
0:
|
||||
Locate 1, 1: Print "jump demostration"
|
||||
Print "Press J to jump to FOR NEXT emulator or"
|
||||
Print "L to jump to WHILE WEND emulator or"
|
||||
Print "Q for quitting"
|
||||
Print
|
||||
S = UCase$(Input$(1))
|
||||
Cls , Rnd * 7 + 1: Locate 7
|
||||
Q = 0
|
||||
If S = "Q" Then End
|
||||
If S = "J" Then GoTo 1
|
||||
If S = "L" Then GoTo 2
|
||||
GoTo 0
|
||||
|
||||
1:
|
||||
If Q = 0 Then Print "FOR NEXT Loop emulation"
|
||||
Print " Q = "; Q
|
||||
Q = Q + 1
|
||||
If Q < 10 Then
|
||||
GoTo 1
|
||||
Else
|
||||
Print "For Next emulation terminated":
|
||||
GoTo 0
|
||||
End If
|
||||
|
||||
2:
|
||||
If Q = 0 Then Print " WHILE WEND emulator"
|
||||
Print " Q = 9 is ";
|
||||
If Q = 9 Then
|
||||
Print "True"
|
||||
Print "WHILE WEND emulator terminated"
|
||||
GoTo 0
|
||||
Else
|
||||
Print "False"
|
||||
End If
|
||||
Q = Q + 1
|
||||
GoTo 2
|
||||
Loading…
Add table
Add a link
Reference in a new issue