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.6 required=5.0 tests=BAYES_00,INVALID_DATE, TO_NO_BRKTS_PCNT,T_FILL_THIS_FORM_SHORT autolearn=no autolearn_force=no version=3.4.4 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 List-Id: >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