 |
AutoHotkey Community Let's help each other out
|
| View previous topic :: View next topic |
| Author |
Message |
jonny
Joined: 13 Nov 2004 Posts: 3004 Location: Minnesota
|
Posted: Mon Apr 25, 2005 7:46 pm Post subject: Undocumented feature or bug in global declaration. |
|
|
This is probably intentional, but it's not documented; the "global" command (if it is indeed a command), as well as static and local, apparently does not support variable interpolation (i.e. "global %var%"). Can either the command or the documentation be fixed, please? Thanks.
Edit: They cannot be executed conditionally either. They seem like mini-directives, almost. |
|
| Back to top |
|
 |
Chris Site Admin
Joined: 02 Mar 2004 Posts: 10480
|
Posted: Tue Apr 26, 2005 3:27 am Post subject: |
|
|
Thanks; I will fix the documentation. The words global, local, and static are declarations. Like some other languages, they are processed immediately at the time the script is launched rather than later while it's running.
Here is the update: | Quote: | | Because the words local, global, and static are processed immediately when the script launches, they cannot be conditionally executed by means of an IF statement. In other words, any use of local, global, or static inside an IF's or ELSE's block will take effect unconditionally. In addition, it is not currently possible to declare a dynamic variable such as global Array%i%. |
|
|
| Back to top |
|
 |
|
|
You can post new topics in this forum You can reply to topics in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|