Modify

Opened 17 years ago

Closed 17 years ago

Last modified 17 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 Changed 17 years ago by JdeB

See this Bugreport for the answer :)

comment:3 Changed 17 years ago by Valik

  • Resolution set to nobug
  • Status changed from new to closed

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 Changed 17 years ago by Holger

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

Guidelines for posting comments:

  • You cannot re-open a ticket but you may still leave a comment if you have additional information to add.
  • In-depth discussions should take place on the forum.

For more information see the full version of the ticket guidelines here.

Add Comment

Modify Ticket

Action
as closed The ticket will remain with no owner.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.