OWBasic for Pocketviewer

Home INTRO Group CONTROL Alphabetical Index

Far jump

JUMP ADDR%[], statval%
SETJUMP%(ADDR%[])

The function SETJUMP% stores the code pointer and some additional data to the array ADDR which has to consist of at least #JUMPBUFSIZE elements. The procedure JUMP jumps to the the code position stored in ADDR. If SETJUMP% returns a value other than 0, it was reached by JUMP; the return value can be given as statval. If statval is 0, the return value is 1.
The functionality of JUMP and SETJUMP is similar to setjmp () and longjmp () in ANSI C.
ATTENTION: A code position stored inside a procedure must not be called from outside the procedure!

Home INTRO Group CONTROL Alphabetical Index