mirror of
https://github.com/irmen/prog8.git
synced 2025-01-12 19:29:50 +00:00
doc tweak, adding qualified name example for goto (#116)
This commit is contained in:
parent
e7698686fa
commit
09f3fbeb38
@ -861,10 +861,12 @@ Unconditional jump: goto
|
|||||||
^^^^^^^^^^^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
To jump to another part of the program, you use a ``goto`` statement with an address or the name
|
To jump to another part of the program, you use a ``goto`` statement with an address or the name
|
||||||
of a label or subroutine::
|
of a label or subroutine. Referencing labels or subroutines outside of their defined scope requires
|
||||||
|
using qualified "dotted names"::
|
||||||
|
|
||||||
goto $c000 ; address
|
goto $c000 ; address
|
||||||
goto name ; label or subroutine
|
goto name ; label or subroutine
|
||||||
|
goto main.mysub.name ; qualified dotted name; see, "Blocks, Scopes, and accessing Symbols"
|
||||||
|
|
||||||
uword address = $4000
|
uword address = $4000
|
||||||
goto address ; jump via address variable
|
goto address ; jump via address variable
|
||||||
|
Loading…
x
Reference in New Issue
Block a user