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, MSGID_RANDY autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,7508aa0d80b8bf66 X-Google-Attributes: gid103376,public From: Robert Dewar Subject: Re: Inheritance and Polymorphism in Ada !! Date: 1999/10/18 Message-ID: <7udtav$ma4$1@nnrp1.deja.com>#1/1 X-Deja-AN: 537271215 References: <7u64k3$l1d$1@hiline.shinbiro.com> <3806DC34.1513E8B1@frqnet.de> <7u7o36$tv8$1@nntp6.atl.mindspring.net> <38077b65_1@news1.prserv.net> X-Http-Proxy: 1.0 x23.deja.com:80 (Squid/1.1.22) for client 205.232.38.14 Organization: Deja.com - Before you buy. X-Article-Creation-Date: Mon Oct 18 01:32:15 1999 GMT X-MyDeja-Info: XMYDJUIDrobert_dewar Newsgroups: comp.lang.ada X-Http-User-Agent: Mozilla/4.04 [en] (OS/2; I) Date: 1999-10-18T00:00:00+00:00 List-Id: In article <38077b65_1@news1.prserv.net>, "Matthew Heaney" wrote: > The purpose of a declare block is to localize the declaration > of objects, as your example illustrated. too narrow a view, there are other reasons: conveniently encapsulate and name a chunk of code used only once, narrow down an exception scope, etc etc. > The purpose of a subprogram is to abstract away algorithmic > complexity. too narrow a view, there are other reasons: allow recursion, name a chunk of code, take advantage of the return semantics, etc. > These are two completely different things, and there should be > no reason why they are confused. Well if you take a simplistic and narrow view, you perhaps can avoid the confusion, but in fact there is a definite overlap for the case of a chunk of non-recursive code that is called just once. This might be a declare block, it might be a procedure, it depends, sometimes one is better, sometimes the other. Sent via Deja.com http://www.deja.com/ Before you buy.