Modify

Opened 9 years ago

Last modified 2 years ago

#3276 assigned Bug

Getting/Setting DllStruct array-element with index stored in varible fails without using Execute

Reported by: genius257 Owned by: Jon
Milestone: Component: AutoIt
Version: Severity: None
Keywords: Cc:

Description

The code below illustrates the problem

$tPoint = DllStructCreate("INT A[5]")
$tPoint.A(1) = 1
$tPoint.A(2) = 2
$tPoint.A(3) = 3
$tPoint.A(4) = 4
$tPoint.A(5) = 5
$i = 5
$tPoint.A($i) = 6;doesn't work

For $i=1 To 5
	ConsoleWrite("["&$i&"]"&($tPoint.A($i))&@CRLF);doesn't work
	ConsoleWrite("["&$i&"]"&Execute("$tPoint.A("&$i&")")&@CRLF);does work
Next

Attachments (0)

Change History (4)

comment:1 by jchd18, 9 years ago

Dot notation for DllStructs is AFAIK not documented. Use DllStructSetData instead.

comment:2 by J-Paul Mesnage, 8 years ago

Resolution: No Bug
Status: newclosed

comment:3 by J-Paul Mesnage, 2 years ago

Resolution: No Bug
Status: closedreopened

comment:4 by J-Paul Mesnage, 2 years ago

Owner: set to Jon
Status: reopenedassigned

In fact i solve the pb
Fix sent to Jon

Modify Ticket

Action
as assigned The owner will remain Jon.

Add Comment


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