Path: utzoo!attcan!cmtl01!matrox!uvm-gen!uunet!lll-winken!lll-lcc!ncis.llnl.gov!helios.ee.lbl.gov!nosc!ucsd!ucbvax!PEANUTS.NOSC.MIL!broman From: broman@PEANUTS.NOSC.MIL (Vincent Broman) Newsgroups: comp.lang.modula2 Subject: What is the use of tag fields and case labels in records ? Message-ID: <8901252027.AA24793@cod.nosc.mil> Date: 25 Jan 89 20:27:26 GMT References: <724@htsa.uucp> Sender: daemon@ucbvax.BERKELEY.EDU Reply-To: Modula2 List Organization: The Internet Lines: 11 Good usage of variant records requires you do your own run-time checking of the tag. Essentially what is required is that references to fields that vary occur only inside CASE tag statements. As a relaxation to this rule one can infer the value of the tag from other parts of the program state and omit the CASE test, but this is error prone. Variant records without tag fields are just a special case of this relaxed usage. Vincent Broman, code 632, Naval Ocean Systems Center, San Diego, CA 92152, USA Phone: +1 619 553 1641 Internet: broman@nosc.mil Uucp: sdcsvax!nosc!broman