Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!swrinde!ucsd!ucbvax!SIERRA.STANFORD.EDU!bryan From: bryan@SIERRA.STANFORD.EDU (Doug L. Bryan) Newsgroups: comp.lang.ada Subject: Gustafson's Pascal with Message-ID: <9104240057.AA10457@sierra.Stanford.EDU> Date: 24 Apr 91 00:57:11 GMT Sender: usenet@ucbvax.BERKELEY.EDU Organization: The Internet Lines: 42 >Date: 4 Feb 91 Wow. The BITNET seems pretty slow lately. >From: Eric Gustafson >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