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=2.1 required=5.0 tests=BAYES_50,FREEMAIL_FROM, HELO_NO_DOMAIN,MAILING_LIST_MULTI,RDNS_NONE,REPLYTO_WITHOUT_TO_CC, SPOOFED_FREEMAIL_NO_RDNS autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,10ed08559aef1b44 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-03-01 12:43:06 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!fr.usenet-edu.net!usenet-edu.net!enst!enst.fr!not-for-mail From: "Gautier Write-only-address" Newsgroups: comp.lang.ada Subject: Re: STATIC types in ADA? Date: Fri, 01 Mar 2002 20:42:13 +0000 Organization: ENST, France Sender: comp.lang.ada-admin@ada.eu.org Message-ID: Reply-To: comp.lang.ada@ada.eu.org NNTP-Posting-Host: marvin.enst.fr Mime-Version: 1.0 Content-Type: text/plain; format=flowed X-Trace: avanie.enst.fr 1015015382 73421 137.194.161.2 (1 Mar 2002 20:43:02 GMT) X-Complaints-To: usenet@enst.fr NNTP-Posting-Date: Fri, 1 Mar 2002 20:43:02 +0000 (UTC) Return-Path: X-Originating-IP: [217.162.132.175] X-OriginalArrivalTime: 01 Mar 2002 20:42:14.0039 (UTC) FILETIME=[91838A70:01C1C161] Errors-To: comp.lang.ada-admin@ada.eu.org X-BeenThere: comp.lang.ada@ada.eu.org X-Mailman-Version: 2.0.8 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: comp.lang.ada mail<->news gateway List-Unsubscribe: , Errors-To: comp.lang.ada-admin@ada.eu.org X-BeenThere: comp.lang.ada@ada.eu.org Xref: archiver1.google.com comp.lang.ada:20669 Date: 2002-03-01T20:42:13+00:00 >Do STATIC data types (like C++ has) exist in ADA? ... >I think private is the closest thing I've found that will do it. It's much simpler. Ada is a block-structured language. A variable declared outside of procedure or package P is "static" relatively to P. Inside of P, it is a local variable just to be used by P. Where a variable is visible, it is alife and keep its value. Ex: package body P is i: Integer; procedure Q is j: integer; function R(...) return ... is k: integer; begin -- here i,j,k are visible ... end R; begin j:= ... i:= i+j; end Q; begin i:= 0; Q; -- i has changed Q; -- again... end P; ________________________________________________________ Gautier -- http://www.mysunrise.ch/users/gdm/gsoft.htm NB: For a direct answer, address on the Web site! _________________________________________________________________ Send and receive Hotmail on your mobile device: http://mobile.msn.com