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,df7d6571cb90914a X-Google-Attributes: gid103376,public From: mheaney@ni.net (Matthew Heaney) Subject: Re: C's static variable Date: 1997/09/05 Message-ID: #1/1 X-Deja-AN: 270149526 References: <34109F10.52E2@communique.net> Organization: Estormza Software Newsgroups: comp.lang.ada Date: 1997-09-05T00:00:00+00:00 List-Id: In article <34109F10.52E2@communique.net>, RL wrote: >Does anyone know how in Ada to produce the equivalent of a static >variable in C? Funny, this is probably the most frequently asked question about Ada. The answer is to declare the variable in a static scope, ie in a package spec or body: package P is A_Static_Variable : Integer; end; P is a library level declaration of a package. It lives as long as the application does, so any variables there are equivalent to C static variables. Check out the Ada FAQ at the Ada home page: -------------------------------------------------------------------- Matthew Heaney Software Development Consultant (818) 985-1271