From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,f6b9e7a488a8fbdb X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII Path: g2news1.google.com!news1.google.com!news.glorb.com!newspeer2.se.telia.net!se.telia.net!masternews.telia.net.!newsb.telia.net.POSTED!not-for-mail From: =?ISO-8859-1?Q?Bj=F6rn_Persson?= User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4.1) Gecko/20031114 X-Accept-Language: sv, sv-se, sv-fi, en-gb, en-us, en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: a beginner question References: <10b97a973c8cc17010b8a5e9d55be273@localhost.talkaboutprogramming.com> In-Reply-To: <10b97a973c8cc17010b8a5e9d55be273@localhost.talkaboutprogramming.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable Message-ID: Date: Wed, 20 Oct 2004 23:53:19 GMT NNTP-Posting-Host: 217.209.116.179 X-Complaints-To: abuse@telia.com X-Trace: newsb.telia.net 1098316399 217.209.116.179 (Thu, 21 Oct 2004 01:53:19 CEST) NNTP-Posting-Date: Thu, 21 Oct 2004 01:53:19 CEST Organization: Telia Internet Xref: g2news1.google.com comp.lang.ada:5552 Date: 2004-10-20T23:53:19+00:00 List-Id: mr1yh1 wrote: > type Person ( S:Sex_T:=3DMale )is > record > Age:Positive ; > Sex:Sex_T:=3DS;------please look at here first > case S is > when Male =3D> > Has_Wife:Boolean ; > when Female=3D> > Has_Husband:Boolean; > end case; > end record;--person end You have defined a person with two independent sexes. By default, Sex is = initialized to the same value as S, but it's perfectly possible to=20 change it. Just remove Sex and let S be the person's sex. > Put(Sex_T'Image(she.Sex)); This line then becomes: Put(Sex_T'Image(she.S)); > why its not possible ? > to put > she:=3D(age=3D>23,has_husband=3D>true); The parenthesis here is called an aggregate. An aggregate must provide=20 values for all the components. But you can do: She.Age :=3D 23; She.Has_Husband :=3D True; --=20 Bj=F6rn Persson PGP key A88682FD omb jor ers @sv ge. r o.b n.p son eri nu