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-Thread: a07f3367d7,8aaaaeb1690d828b X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news2.google.com!npeer03.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!post02.iad.highwinds-media.com!news.flashnewsgroups.com-b7.4zTQh5tI3A!not-for-mail Newsgroups: comp.lang.ada Subject: Re: writing on terminal before an exception References: From: Stephen Leake Date: Mon, 03 Aug 2009 02:39:12 -0400 Message-ID: User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.2 (windows-nt) Cancel-Lock: sha1:bKgAH28YiBbOG8JlEOVXAy1FNRQ= MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Complaints-To: abuse@flashnewsgroups.com Organization: FlashNewsgroups.com X-Trace: 644674a768625e197caa704694 Xref: g2news2.google.com comp.lang.ada:7534 Date: 2009-08-03T02:39:12-04:00 List-Id: mfads@yahoo.com (Mark Fabbri) writes: > i have a problem with text_io and exception: > > Text_IO.Put ("No SH3 data."); > Text_IO.New_Line; > raise Sh3_NoData; > > if it raise an exception, the string "NO SH3 data" is not displayed. it > seems that the text_io don't actually print on screen. i also tryed with > text_io.flush after the New_Line, but nothing happens. What compiler and operating system? It works for me with GNAT on Windows: with Ada.Text_IO; use Ada.Text_IO; procedure Hello is Sh3_NoData : exception; begin Put ("No SH3 data."); New_Line; Flush; raise Sh3_NoData; end Hello; gnatmake -p -k -C -Pgnat.gpr hello gnatbind -E -I- -x C:\Stephe\Ada_Work\Gnat\objects\hello.ali gnatlink C:\Stephe\Ada_Work\Gnat\objects\hello.ali -LC:\Apps\GNAT-6.2.1\lib\asis -lasis -o C:\Stephe\Ada_Work\Gnat\hello.exe ./hello.exe No SH3 data. Execution terminated by unhandled exception Exception name: HELLO.SH3_NODATA Message: hello.adb:9 Call stack traceback locations: 0x401776 0x4016c8 0x401235 0x401286 0x7c817075 Perhaps you have Text_IO.Standard_Output redirected somewhere? -- -- Stephe