[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

How can I define UNION in ruby?

Zhan feng Wang

8/15/2007 12:50:00 AM

Hi,friends,
I'd like to know how can I define UNION in ruby?
e.g.
In C, I have a UNION as following:
union ID_OCT{
struct ID_BIT{
unsigned class:2; /*b8,b7*/
unsigned if_prim:1; /*b6,0--primitive*/
unsigned tag_no:5;/*if >=31,second byte give tag_no base
128*/
}id;
unsigned char c;
}rid;

How can I define this in Ruby?

Which document specified this?
Thanks
--
Posted via http://www.ruby-....