Yes, you can do GOSUB's recursively.  Most often it happens by accident and
you hit the limit (256?) of GOSUB depth.

The only problem is that internal subroutines do not have local variables so
the second call is using the same variables as its parent.  If this is a
problem, using dynamic arrays to stack the necessary items is quite neat.

Be sure to document thoroughly what you are doing in the code or you will
open up a whole new area for disasters when someone comes to modify the
routine in the future.

Martin Phillips
Ladybridge Systems
17b Coldstream Lane, Hardingstone, Northampton NN4 6DB
+44-(0)1604-709200

----- Original Message ----- 
From: "Marco Manyevere" <[EMAIL PROTECTED]>

> Can a UV GOSUB directly or indirectly refer to itself? Something like so:
>
> LABEL:
>    ....
>    IF (SOME.CONDITION) THEN GOSUB LABEL
>    ....
>    RETURN

-- 
u2-users mailing list
[EMAIL PROTECTED]
http://www.oliver.com/mailman/listinfo/u2-users

Reply via email to