It would be useful to have constants. They're an indication to the reader that the value specified won't change, cannot change and is not intended to change, and will prevent inadvertent reassignments.
I'd also like to see the ability to refactor details such as program name, version, copyright into constants that the revised ahk2exe's compiler directives can pick up on, instead of having to define each one twice.
(And real constants — Perl's pretendoconstants cause all sorts of weird and seemingly inexplicable compile and runtime errors and lead to strange decoration of the functions to force them to work properly. I'm thinking more like a const keyword to complement global.)
Constants
-
- Posts: 13
- Joined: 23 Jul 2016, 15:57
- Blackholyman
- Posts: 1293
- Joined: 29 Sep 2013, 22:57
- Location: Denmark
- Contact:
Re: Constants
Courses on AutoHotkey
My Autohotkey Blog
Re: Constants
Code: Select all
; Allow constants (FixedVars) in directives.
; Example:
#FixedVars ThisInstanceWinTitle:="Hugo" , ThisInstanceWinText:="File"
...
; Allow to use constants (FixedVars) in directives.
#IfWinActive , %ThisInstanceWinTitle% , %ThisInstanceWinText%
F12::
...
return
; Forbidden:
ThisInstanceWinTitle:=...
; OK:
a:=ThisInstanceWinTitle
https://github.com/Grrdi/ZackZackOrdner/archive/master.zip --> get folders on the quick
-
- Posts: 13
- Joined: 23 Jul 2016, 15:57
Re: Constants
I wouldn't suggest using old syntax for a new feature.
Re: Constants
I thought it would fit in here. By the way, constants would also have been implemented.
Should a new forum entry be branched off?
@Administrator:
If so, from me, or is this done by an administrator?
Should a new forum entry be branched off?
@Administrator:
If so, from me, or is this done by an administrator?
Who is online
Users browsing this forum: No registered users and 26 guests