TIP: Click on subject to list as thread! ANSI
echo: quik_bas
to: BERT BYFIELD
from: KURT KUZBA
date: 1998-03-25 05:34:00
subject: STATIC Procedure Question

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)

SOURCE: echomail via exec-pc

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.