From: bryan@SIERRA.STANFORD.EDU (Doug L. Bryan)
Subject: Gustafson's Pascal with
Date: 24 Apr 91 00:57:11 GMT [thread overview]
Message-ID: <9104240057.AA10457@sierra.Stanford.EDU> (raw)
>Date: 4 Feb 91
Wow. The BITNET seems pretty slow lately.
>From: Eric Gustafson <ece490%VALPO.BITNET@UICVM.uic.edu>
>Subject: An equilivant to Pascal's WITH in Ada??
>Message-ID: <9104210400.AA06564@ajpo.sei.cmu.edu>
>Example ( In Pascal ):
>..
>Type
> PersonRec = Record
> Name : String;
> Age : Integer;
> ID : Integer;
> end; { PersonRec }
I'm not sure how you plan to handle strings, so I'll ignore then
in my example.
-- Ada
type Person_Rec is record
Age : Integer;
ID : Integer;
end record;
> WITH Person do
> begin
> Age := 24;
> ID := 123930;
> end; { with person }
-- Ada
With_Person: declare
Age : Integer renames Person.Age;
ID : Integer renames Person.ID;
begin
Age := 24;
ID := 123930;
end With_Person;
doug
reply other threads:[~1991-04-24 0:57 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox