Jump anywhere: Difference between revisions

no edit summary
(Added XPL0 example.)
No edit summary
Line 2,334:
{{out}}
<pre>Igual que la entrada de FutureBasic.</pre>
 
=={{header|QB64}}==
<lang QB64>
' Jumps in QB64 are inherited by Qbasic/ QuickBasic/ GWBasic
' here a GOTO demo of loops FOR-NEXT anf 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
</lang>
 
=={{header|Quackery}}==