🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: net.lang.ada
Article #1056

Re: variant records

#1056
From: Bev Sobelman
Date: Mon, 03 Nov 1986 14:17
24 lines
1387 bytes
This may apply to your constraint error problem:

When you declare a rec variable, are you using the default discriminant 
and then reassigning the whole record, or are you overriding the
default when you declare the record variable?  Consider these:

      Rec_1 : rec (kind => B);     -- this is a constrained record

       --- VS ---

      Rec_2 : rec;                -- this is unconstrained with
          .                          default discrim. = A 
          .
          .
      Rec_2 := (kind => B);       -- now have discrim. = B, still
                                     unconstrained

I haven't looked at the whole thing carefully enough to know whether
this would make a difference at position 'Z', but I thought it was
worth mentioning.

Bev Sobelman
bhs@mitre-bedford.arpa
Technical Details
Message-ID: <8611031417.AA28139@mitre-bedford.ARPA>
Path: arc1-ca.pugleaf.net!utzoo!mnetor!seismo!rutgers!nike!ucbcad!ucbvax!MITRE-BEDFORD.ARPA!bhs
References: <2886@rsch.WISC.EDU>

Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: arc1-ca.pugleaf.net!utzoo!mnetor!seismo!rutgers!nike!ucbcad!ucbvax!MITRE-BEDFORD.ARPA!bhs
From: bhs@MITRE-BEDFORD.ARPA (Bev Sobelman)
Newsgroups: net.lang.ada
Subject: Re: variant records
Message-ID: <8611031417.AA28139@mitre-bedford.ARPA>
Date: Mon, 3-Nov-86 09:17:17 EST
Article-I.D.: mitre-be.8611031417.AA28139
Posted: Mon Nov  3 09:17:17 1986
Date-Received: Sun, 9-Nov-86 03:47:51 EST
References: <2886@rsch.WISC.EDU>
Sender: daemon@ucbvax.BERKELEY.EDU
Organization: The MITRE Corp., Bedford, MA
Lines: 24