Path: utzoo!utgpu!water!watmath!clyde!rutgers!rochester!cornell!batcomputer!itsgw!steinmetz!uunet!nuchat!sugar!schaub From: schaub@sugar.UUCP (Markus Schaub) Newsgroups: comp.lang.modula2 Subject: Re: union types Message-ID: <1769@sugar.UUCP> Date: 27 Mar 88 20:13:40 GMT References: <8803221947.AA00248@nrl-iws6.ARPA> Organization: Sugar Land UNIX - Houston, TX Lines: 19 > struct obj_name { | objName=RECORD > int obj_type; | objType: INTEGER; > union { | objId: RECORD > int id; | CASE (* objType *):INTEGER OF > char *path; | | 0: id: INTEGER; > } obj_id; | | 1: path: POINTER TO CHAR > }; | END > | END > | END > | > -- Mark Cornwell | -- Markus Schaub If obj_id is not used, you can simplify the RECORD to a single case-record. -- // Markus Schaub | The Modula-2 People: // M2Amiga Developer | Interface Technologies Corp. \\ // uunet!nuchat!sugar!schaub | 3336 Richmond Ave. Suite 323 \X/ (713) 523-8422 | Houston, TX 77098