Posted: Wed Nov 26, 2003 9:49 pm
Hey Psychophanta your code works also fine with global variables:

Code: Select all
Procedure.l go_sub(d, f, g)
Shared a,b,c
If a = 1
!jmp near lbl_a1;<-a Gosub here write next address (rett) into at compilation time and then just jumps.
!rett:; |
EndIf; |
; /
Debug "a="+Str(a)+", b="+Str(b)+", c="+Str(c) ; |
ProcedureReturn ; /
; /
!lbl_a1:; /
; /
a = b+c; /
!jmp near rett;<-------------------------------------------/
EndProcedure
a=1:b=1:c=1
go_sub(2, 2, 2)
