AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Undocumented feature or bug in global declaration.

 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Bug Reports
View previous topic :: View next topic  
Author Message
jonny



Joined: 13 Nov 2004
Posts: 3004
Location: Minnesota

PostPosted: Mon Apr 25, 2005 7:46 pm    Post subject: Undocumented feature or bug in global declaration. Reply with quote

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
View user's profile Send private message
Chris
Site Admin


Joined: 02 Mar 2004
Posts: 10480

PostPosted: Tue Apr 26, 2005 3:27 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Bug Reports All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group