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.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,96ae138aab3beb03,start X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-05-31 06:24:41 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!fr.usenet-edu.net!usenet-edu.net!news.tele.dk!not-for-mail Message-ID: <3CF77998.9040806@yahoo.com> Date: Fri, 31 May 2002 15:24:40 +0200 From: David Rasmussen User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.9) Gecko/20020412 Debian/0.9.9-6 MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Localized Variable Declaration Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Organization: TDC Internet NNTP-Posting-Host: 195.215.62.2 X-Trace: 1022851481 dtext.news.tele.dk 96090 195.215.62.2 X-Complaints-To: abuse@post.tele.dk Xref: archiver1.google.com comp.lang.ada:25074 Date: 2002-05-31T15:24:40+02:00 List-Id: I am a C++ programmer learning Ada. So far, I love it. It is more or less the answer to my prayers. The only thing I miss which I think really enhances readability and minimizes bugs (two things that Ada excels at), is the ability to declare a variable "anywhere". In C++ we can declare a variable exactly when it is needed, which is easier to read, than to have to scroll up to the beginning of the function to see what type/size/whatever, a variable is. Also, it directly makes it possible more often to initialize a variable with a sensible value, because it is available, which it wouldn't be at the start of the function/scope. Is there anyway to address this problem? /David