11-13-2003, 12:26 AM
I really can't remember how it is done.
We all know that to make a value be static to a function or sub we use the STATIC command:
If we call this sub 5 times it will print 1, 2, 3, 4 and 5.
What about arrays? I have this:
How do I make that array static? I get a duplicate definition error when I try to add a STATIC a() to the code.
Any clues?
We all know that to make a value be static to a function or sub we use the STATIC command:
Code:
SUB dummy
STATIC a
a = a + 1
PRINT a
END SUB
If we call this sub 5 times it will print 1, 2, 3, 4 and 5.
What about arrays? I have this:
Code:
SUB dummy2
DIM a(7)
...
END SUB
How do I make that array static? I get a duplicate definition error when I try to add a STATIC a() to the code.
Any clues?
SCUMM (the band) on Myspace!
ComputerEmuzone Games Studio
underBASIC, homegrown musicians
[img]http://www.ojodepez-fanzine.net/almacen/yoghourtslover.png[/i
ComputerEmuzone Games Studio
underBASIC, homegrown musicians
[img]http://www.ojodepez-fanzine.net/almacen/yoghourtslover.png[/i