Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
19
Task/Jump-anywhere/VBA/jump-anywhere.vba
Normal file
19
Task/Jump-anywhere/VBA/jump-anywhere.vba
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
Public Sub jump()
|
||||
Debug.Print "VBA only allows"
|
||||
GoTo 1
|
||||
Debug.Print "no global jumps"
|
||||
1:
|
||||
Debug.Print "jumps in procedures with GoTo"
|
||||
Debug.Print "However,"
|
||||
On 2 GoSub one, two
|
||||
Debug.Print "named in the list after 'GoSub'"
|
||||
Debug.Print "and execution will continue on the next line"
|
||||
On 1 GoTo one, two
|
||||
Debug.Print "For On Error, see Exceptions"
|
||||
one:
|
||||
Debug.Print "On <n> GoTo let you jump to the n-th label"
|
||||
Debug.Print "and won't let you continue."
|
||||
Exit Sub
|
||||
two:
|
||||
Debug.Print "On <n> GoSub let you jump to the n-th label": Return
|
||||
End Sub
|
||||
Loading…
Add table
Add a link
Reference in a new issue