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=0.6 required=5.0 tests=BAYES_00,FROM_WORDY, LOTS_OF_MONEY autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,aeab6b16387b2612 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-07-16 17:16:03 PST Path: archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!feed2.onemain.com!feed1.onemain.com!cyclone2.usenetserver.com!newscon06.news.prodigy.com!newsmst01.news.prodigy.com!prodigy.com!postmaster.news.prodigy.com!newssvr11.news.prodigy.com.POSTED!not-for-mail From: "Ken Garlington" Newsgroups: comp.lang.ada References: <9itna2$i5b$1@news.tpi.pl> Subject: Re: Nonsense (was Re: How to do it in Ada ?) Organization: ex-FlashNet, now Prodigy X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4522.1200 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 Message-ID: <5rL47.64$3h.25862251@newssvr11.news.prodigy.com> NNTP-Posting-Host: 65.65.210.133 X-Complaints-To: abuse@prodigy.net X-Trace: newssvr11.news.prodigy.com 995328833 6207069 65.65.210.133 (Mon, 16 Jul 2001 20:13:53 EDT) NNTP-Posting-Date: Mon, 16 Jul 2001 20:13:53 EDT Date: Tue, 17 Jul 2001 00:13:53 GMT Xref: archiver1.google.com comp.lang.ada:10036 Date: 2001-07-17T00:13:53+00:00 List-Id: "Mark Lundquist" wrote in message news:yAG47.358161$p33.7256533@news1.sttls1.wa.home.com... : : I wrote nonsense in message : news:P0F47.357734$p33.7248200@news1.sttls1.wa.home.com... : > : >[snip] : > : > Alternatively, the declaration could be written this way: : > : > X := new X_Array_Type (1 .. N) := (others => 0); : > : : What a bunch of crap! I can't belive I wrote that. It must have been : before my first cup of coffee this morning. Or, I started writing that line : and then went away, and then came back and blew a brain fuse when I resumed : typing. Maybe when I went away, it was to get the cup of coffee! : : What one *could* write (not that you'd want to, but it illustrates the : language concept I was trying to highlight), is: : : X : new X_Array_Type (1 .. N); : : begin : X := (others => 0); This still looks a little off... perhaps you meant something like package X_Array is type Object is array (Positive range <>) of Integer; type Object_Access is access Object; function New_Object_Access return Object_Access; end X_Array; package body X_Array is function N return Positive is... (see other post) function New_Object_Access return Object_Access is X : Object_Access := new Object(1 .. N); begin X.all := (others => 0); return X; end New_Object_Access; end X_Array;