Modify

Opened 9 years ago

Closed 9 years ago

#3062 closed Bug (No Bug)

AuCheck didn't catch ' without &

Reported by: anonymous Owned by:
Milestone: Component: AutoIt
Version: 3.3.12.0 Severity: None
Keywords: Cc:

Description

The code is:

Local $udfKeys = 'ab-c'
MsgBox(0,'',@ScriptLineNumber&':StringSplit($udfKeys,'-',0)[1]', _
StringSplit($udfKeys,'-',0)[1])

AU3Check doesn't complain.

In case this looks to you like a stupid or contrived piece of code, it arose in the following context.

I have a function ConsDebug(), that dumps the values of variables (including arrays) to the Console. I made it particularly easy to use:

I write

ConsDebug(@ScriptLineNumber&':',

then use AutoComplete to help in typing variable names, and Copy/Paste for stuff like StringSplit($udfKeys,'-',0), add a )

I then back-arrow once. I then Shift_BackArrow back to the comma I typed.

I then Ctrl_C, move the cursor to after the :, and Paste.

In this way I rapidly code a call to my dump function.

But this time, I didn't notice that ' occurs in the value arguments.

My code, before simplifying it for Trac, is:

#include "cdebug.au3"
ConsDebug(@ScriptLineNumber&':StringSplit($udfKeys,'-',0)', _
StringSplit($udfKeys,'-',0))

Attachments (0)

Change History (2)

comment:1 Changed 9 years ago by c.haslam

anonymous => c.haslam

comment:2 Changed 9 years ago by Jpm

  • Resolution set to No Bug
  • Status changed from new to closed

Au3Check is not perfect but in this check It does as AutoIT which does not complain either

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.