In article <
c9be2b60-483a-4666...@googlegroups.com>,
BASICs that have a concept of local variables in procedures/functions
ought to work like the latter example here - ones I know and have used
include BBC Basic and my own RTB Basic.
An example might look like:
>LIST
100 a = 10
110 PROCtest
120 PRINT a
140 END
150 DEF PROCtest
160 LOCAL a
170 a = 20
180 ENDPROC
>RUN
10
This is BBC Basic (6502) - there is no real distinction of where in the
program code the procedure can lie as long as it's not executed in the
normal program flow.
-Gordon