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 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,96ae138aab3beb03 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-05-31 06:51:02 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.vmunix.org!newsfeed.stueberl.de!newspeer1-gui.server.ntli.net!ntli.net!news8-gui.server.ntli.net.POSTED!53ab2750!not-for-mail From: "martin.m.dowie" Newsgroups: comp.lang.ada References: <3CF77998.9040806@yahoo.com> <3CF77CDA.3090805@yahoo.com> Subject: Re: Localized Variable Declaration X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 Message-ID: Date: Fri, 31 May 2002 14:50:54 +0100 NNTP-Posting-Host: 62.252.150.84 X-Complaints-To: abuse@ntlworld.com X-Trace: news8-gui.server.ntli.net 1022853062 62.252.150.84 (Fri, 31 May 2002 14:51:02 BST) NNTP-Posting-Date: Fri, 31 May 2002 14:51:02 BST Organization: ntlworld News Service Xref: archiver1.google.com comp.lang.ada:25081 Date: 2002-05-31T14:50:54+01:00 List-Id: "David Rasmussen" wrote in message news:3CF77CDA.3090805@yahoo.com... > Oh sure, but that is pretty tedious, compared to just a one line > variable declation. The point is, to be a bit extreme, that centralized > variable declations (e.g. at the "beginning" of the function) as done in > C and Pascal, are evil. Variables should be declared close to where they > are needed, IMO. Sure, but that's what you get with a declare ... begin ... end. You also get to delimit the scope in the example I gave there could have been 100 more lines after the 'end' that just didn't need visibility of the local variable. Can you do that with a 'one line variable declaration'?