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,FREEMAIL_FROM, INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,133de21eb82605b X-Google-Attributes: gid103376,public From: johnherro@aol.com (John Herro) Subject: Re: How do functions return unbounded arrays? Date: 1998/06/15 Message-ID: <1998061518584100.OAA28557@ladder01.news.aol.com>#1/1 X-Deja-AN: 362907395 References: <358444BA.757121D8@cl.cam.ac.uk> X-Admin: news@aol.com Organization: AOL http://www.aol.com Newsgroups: comp.lang.ada Date: 1998-06-15T00:00:00+00:00 List-Id: Markus Kuhn asks several questions, including > Are there Ada programs that cause a heap > overflow just by calling "&" in a long loop? That question I can answer definitely. The following program raises Storage_Error on my machine when compiled with Open Ada (an Ada 83 compiler). The "with Text_IO;" is necessary with that compiler if the user is to see the unhandled exception: with Text_IO; procedure Test is S : String(1 .. 18); begin for L in Long_Integer range 10_000_000 .. 99_999_998 loop S := Long_Integer'Image(L) & Long_Integer'Image(L + 1); end loop; end Test; - John Herro You can download a shareware Ada Tutor from http://members.aol.com/AdaTutor