Flow-control structures: Difference between revisions

m
Structure
m (→‎{{header|PureBasic}}: Some more meat on the bone)
m (Structure)
Line 816:
Return ; Returns to the point in the code where the Gosub jumped from</lang>
===FakeReturn===
If the command Goto is used within the body of a sub routine, FakeReturn must be used to correct the stack or the program will crash.
<lang PureBasic>Gosub MySub
 
Line 828 ⟶ 829:
EndIf
Return</lang>
 
If the command Goto is used within the body of a sub routine, FakeReturn must be used to correct the stack or the program will crash.
===OnErrorGoto===
This will transferee the program execution to the defined label if an error accrue.
Anonymous user