BB> I read somewhere that procedures should be STATIC, as in:
BB> SUB DoIt (s$) STATIC
BB> FUNCTION DoItAgain (s$) STATIC
BB> Anybody know what this does and why it matters?
Making them STATIC keeps the variables used in them from
going away when you exit them and reinitializing them when
you reenter them. Normally, a variable created in a SUB or
FUNCTION will exist only until you exit, being initialized
on each call. You can also specify that only the variables
you actually need to keep are made STATIC.
Using dynamic variables, vs. static, means that your code
modules are not using up variable memory when not in use.
Not ALL SUBs and FUNCTIONs should be made STATIC.
Memory should be allocated only to those variables which
are required for your program. There is no point in keeping
memory tied up with unused variables.
> ] Let he among you without sin cast the first... OW! HEY!!....
---
---------------
* Origin: *YOPS ]I[* 8.4 GIG * RA/FD/FE * Milwaukee, WI (1:154/750)
|