Internal structure

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
User_Russian
Addict
Addict
Posts: 1518
Joined: Wed Nov 12, 2008 5:01 pm
Location: Russia

Internal structure

Post by User_Russian »

It would be great if in a structure could create the structure.
As in C.

Code: Select all

typedef union _LARGE_INTEGER {  
    struct {
        DWORD LowPart;  
        LONG  HighPart; 
    };
    LONGLONG QuadPart;
} LARGE_INTEGER;
User avatar
Demivec
Addict
Addict
Posts: 4260
Joined: Mon Jul 25, 2005 3:51 pm
Location: Utah, USA

Re: Internal structure

Post by Demivec »

This is referred to as an 'anonymous structure' and has been requested before here.

I agree it would be nice to have.
davido
Addict
Addict
Posts: 1890
Joined: Fri Nov 09, 2012 11:04 pm
Location: Uttoxeter, UK

Re: Internal structure

Post by davido »

Hi Guys,

Would you take a moment to explain the benefits of such structures and how they might be used?

Always nice to learn something new.

Regards

Dave
DE AA EB
juror
Enthusiast
Enthusiast
Posts: 228
Joined: Mon Jul 09, 2007 4:47 pm
Location: Courthouse

Re: Internal structure

Post by juror »

If I remember correctly, this kind of behavior is more likely to cause "down". :)
Post Reply