Modify

Opened 14 years ago

Closed 13 years ago

#2220 closed Feature Request (Rejected)

C struct-like syntax

Reported by: matwachich@… Owned by:
Milestone: Component: AutoIt
Version: Severity: None
Keywords: Cc:

Description

Hello!
When I see the new AutoIt beta (3.9.xx), I think it's the moment to ask for some new features!

So I'd like for AutoIt is: a C-struct-like syntax.
I mean, rather than using DllStructxxx functions, it would be great to be able to access directly to the members of a DllStruct, just like we will do it in C

Example:

$struct = DllStructCreate("int first;uint unsigned;str text")
$struct.first = 10
$struct.unsigned = 20
$struct.text = "Hello world!"

; And why not, something like...
$ptr = DllStructGetPtr($struct)
$ptr->first = 15
$ptr->unsigned += 30

So, I don't know how hard this would be to implement, and if it's possible.

Anyway, thanks for reading me.

Attachments (0)

Change History (4)

comment:1 by TicketCleanup, 14 years ago

Version: 3.3.8.1

Automatic ticket cleanup.

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

This syntax was previously possible but it was decided not to use it anymore to avoid conflict with COM syntax

comment:3 by Valik, 14 years ago

That is not correct. It was removed because within 3 seconds people were using it to fake objects completely missing the point that AutoIt is designed to be a dynamically typed language without the need for explicit memory management. DllStructs are typed and can require memory management so they are not suitable for the abuse people were attempting.

comment:4 by Jon, 13 years ago

Resolution: Rejected
Status: newclosed

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.