Modify

Opened 18 years ago

Closed 18 years ago

Last modified 18 years ago

#51 closed Bug (No Bug)

Problem with "Au3Check" and "IsDeclared"

Reported by: Holger Owned by:
Milestone: Component: Other
Version: 3.2.10.0 Severity:
Keywords: au3check scite Cc:

Description

Au3Check 'seems' to have a problem with correct checking of lines with "IsDeclared".
Here a small example:

#include <GUIConstants.au3>

If Not IsDeclared("WM_COMMAND") Then Global Const $WM_COMMAND = 0x0111

Whith running these lines there is no problem only with checking.
This is the output:

>C:\Userapps\AutoIt3\SciTE\..\au3check.exe "C:\Userapps\AutoIt3\test.au3"
AutoIt3 Syntax Checker v1.54.8  Copyright (c) Tylo 2007

C:\Userapps\AutoIt3\test.au3(3,71) : ERROR: $WM_COMMAND previously declared as a 'Const'
If Not IsDeclared("WM_COMMAND") Then Global Const $WM_COMMAND = 0x0111
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Userapps\AutoIt3\test.au3 - 1 error(s), 0 warning(s)
>Exit code: 2    Time: 0.328

Holger

Attachments (0)

Change History (4)

comment:1 by Jos, 18 years ago

See this Bugreport for the answer :)

comment:3 by Valik, 18 years ago

Resolution: nobug
Status: newclosed

If you're going to write that much code and still hard-code the constant anyway, you might as well just hard-code it with a different name if you're really that concerned about the symbol not being found.

Personally, I find that code to be one of the stupidest blocks of code you can write in AutoIt. Resolving as nobug as I don't consider this a bug.

comment:4 by Holger, 18 years ago

OK, maybe it's easy to solve it like this if you are only using 1 include-file.
But what if you are using more files (ie. from different users)?
So everyone has to create her/his own variable names that exist only once in all included scripts.
This should be a/the solution? - I don't think so.
The problem - and this is a problem - still exists.
Holger

Modify Ticket

Action
as closed The ticket will remain with no owner.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.