static variable - question
Hey guys.
If I declare a static variable in a function like this: PHP Code:
{ EOS, EOS, EOS......., EOS } or { 'H', EOS, EOS......., EOS } ? |
Re: static variable - question
It will be the same as you left it in the previous call...so the first element will have 'H' in 0 pos.
If you're familiar with global variables, think of static being the same in functionality except it is limited to the scope of the function where it was declared. |
Re: static variable - question
This is easily tested . . .
Also, to initialize all cells of an array to a single value, you must do this: PHP Code:
|
Re: static variable - question
See http://www.compuphase.com/pawn/Pawn_Language_Guide.pdf
Code:
• Static local declarations |
| All times are GMT -4. The time now is 15:12. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.