07-14-2003, 12:00 AM
and GOSUB wouldn't work either. GOSUBroutines are still part of the module level code. You'd have to use SUB statements and access your subroutines with CALL or else use FUNCTIONs,
e.g.,
SUB MYSUB(VAR1, VAR2)
and then you'd run the code in MYSUB with
CALL MYSUB(VAR1, VAR2)
line of code
line of code
.
.
.
END SUB
or
FUNCTION MYFUNC(VAR1, VAR2)
line of code
line of code
.
.
.
END FUNCTION
and then you'd use MYFUNC via something like
A = MYFUNC
(You need to use a DECLARE statement with functions and if you use one for your SUBs, you don't need to use CALL and you leave off the parentheses in the call statement.)
e.g.,
SUB MYSUB(VAR1, VAR2)
and then you'd run the code in MYSUB with
CALL MYSUB(VAR1, VAR2)
line of code
line of code
.
.
.
END SUB
or
FUNCTION MYFUNC(VAR1, VAR2)
line of code
line of code
.
.
.
END FUNCTION
and then you'd use MYFUNC via something like
A = MYFUNC
(You need to use a DECLARE statement with functions and if you use one for your SUBs, you don't need to use CALL and you leave off the parentheses in the call statement.)
ravelling Curmudgeon
(geocities sites require copying and pasting URLs.)
I liked spam better when it was something that came in a can.
Windows should be defenestrated.
(geocities sites require copying and pasting URLs.)
I liked spam better when it was something that came in a can.
Windows should be defenestrated.