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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,9c4622dc4c4e0179 X-Google-Attributes: gid103376,public From: "Theodore E. Dennison" Subject: Re: C to Ada (static) Date: 1996/04/26 Message-ID: <31816109.7D55368C@escmail.orl.mmc.com>#1/1 X-Deja-AN: 151624523 references: <4lr2eq$o3c$1@mhadf.production.compuserve.com> content-type: text/plain; charset=us-ascii organization: Lockheed Martin Information Systems mime-version: 1.0 newsgroups: comp.lang.ada x-mailer: Mozilla 2.0 (X11; I; SunOS 4.1.3_U1 sun4m) Date: 1996-04-26T00:00:00+00:00 List-Id: Heinz-Gerd Kuester wrote: > > How do I translate this to ADA? > > void myfunc (void) > { > static int number; /* <= the static stuff in Ada? */ > > } Ada doesn't have anything like static variables. To get the same functionality, you will have to declare the variable globally somewhere visible to that routine. Example: package body My_Package is Number : Integer; procedure My_Procedure is begin ...series of statements... end My_Procedure; end My_Package; -- T.E.D. | Work - mailto:dennison@escmail.orl.mmc.com | | Home - mailto:dennison@iag.net | | URL - http://www.iag.net/~dennison |