realbasic-nug
[Top] [All Lists]

Re: FR for ability to easily define and access Unions and Unions within

To: "REALbasic NUG" <realbasic-nug at lists dot realsoftware dot com>
Subject: Re: FR for ability to easily define and access Unions and Unions within Structures in RB for use with Declares
From: "Jim Dossey" <jim dot dossey at gmail dot com>
Date: Tue, 27 Feb 2007 10:52:08 -0500
Delivered-to: listarchive at realsoftware dot com
Delivered-to: realbasic-nug at lists dot realsoftware dot com
References: <BAY107-DAV2184F881FC5ABD74CCE575938D0 at phx dot gbl> <BAY107-DAV21D835ECEDE5D753525AC3938D0 at phx dot gbl>
On 2/24/07, Daniel Stenning <d0stenning at msn dot com> wrote:

> >
> > Failing that, being able to define a structure element as being a
> "block" of
> > a fixed size, that could be dereferenced in similar fashion to the
> > MemoryBlock syntax  woud be sufficient.
> >
> > so for example we could declare a RB structure as something like
> >
> > Structure MyStruct
> >     IntElement As Integer
> >     BoolElement As Boolean
> >     UnionElement As Block * 8
> > End Structure
> >
> > one would then be able to reference myUnionElement  in the following
> > fashion:
> >
> > dim str as MyStruct
> >  str. UnionElement.Boolean(0) = true
> >  str. UnionElement.Integer(0) = 12345
> >  str. UnionElement.Double(0) = 666.666



I would like to have the ability to reference a block of memory using both a
structure and a memoryblock at the same time.  I'm using some Windows
declares that return variable sized structures.  They have a fixed structure
area at the beginning of the block, which is followed by a variable area.
There are pointers in the fixed structure block that point to variable sized
fields in the variable block.

There is no FR for this.  I'm just wondering if anyone else could use this
feature.
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>


<Prev in Thread] Current Thread [Next in Thread>