Modify

Opened 8 years ago

Last modified 8 weeks 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 Changed 8 years ago by jchd18

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

comment:2 Changed 6 years ago by Jpm

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

comment:3 Changed 8 weeks ago by Jpm

  • Resolution No Bug deleted
  • Status changed from closed to reopened

comment:4 Changed 8 weeks ago by Jpm

  • Owner set to Jon
  • Status changed from reopened to assigned

In fact i solve the pb
Fix sent to Jon

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 assigned The owner will remain Jon.
Author


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

 
Note: See TracTickets for help on using tickets.