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,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,8ee36bc9f5f21359 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news4.google.com!news.glorb.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local01.nntp.dca.giganews.com!nntp.comcast.com!news.comcast.com.POSTED!not-for-mail NNTP-Posting-Date: Mon, 16 May 2005 08:43:19 -0500 From: "Steve" Newsgroups: comp.lang.ada References: <1115772555.000422.205200@f14g2000cwb.googlegroups.com> Subject: Re: Need a Sanity Check Date: Mon, 16 May 2005 06:43:16 -0700 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.2180 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 X-RFC2646: Format=Flowed; Original Message-ID: NNTP-Posting-Host: 24.22.63.157 X-Trace: sv3-txLcNnzEpLwZDRn6J28CuJ77ERkmggOJyj89TyaaToayJgnwdeJ5QqZeOatlqkKWcLS5fykrBw4ckSF!8UjVlQV9+AL8djbnJu3mmhOfF2++l9HPDo5Hw/URxs7zmIkcbps+xH6cfWy+ X-Complaints-To: abuse@comcast.net X-DMCA-Complaints-To: dmca@comcast.net X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.32 Xref: g2news1.google.com comp.lang.ada:11039 Date: 2005-05-16T06:43:16-07:00 List-Id: I believe the output you get from this program is dependent on the runtimes implementation of Text_IO. The old ARM 9.5.1: During a protected action, it is a bounded error to invoke an operation that is potentially blocking. The following are defined to be potientially blocking operations: an accept_statement a call on a subprogram whose body contains a potnentially blocking operation. I believe the calls to Text_IO may be potentially blocking. A language lawyer may be able to help with this. To get away from this restriction you might see if changing the source from: accept Three do Text_Io.Put_Line( "Three" ); end; To: accept Three do null; end; Text_Io.Put_Line( "Three" ); Or just accept Three; Text_Io.Put_Line( "Three" ); to see if this changes the behavior. Whether it is right or wrong, I have a note in my mind to only do simple things like copying data inside of an accept statement. Steve (The Duck) "autstspe" wrote in message news:1115772555.000422.205200@f14g2000cwb.googlegroups.com... > Hello. I'm seeing some strange behavior from an Ada95 program. I've > spoken to several people I work with and we all agree it should not > behave the way it does. Its a simple program so I was wondering if > someone could take a look at the following an tell me what the output > should be. It should take just a minute. Unfortunately, due to > restrictions, I can't say much more. Thanks. > > ========================================================================== > package T123_Pack is > > task type Three_Entries_Type is > entry Start ; > entry One ; > entry Two ; > entry Three ; > end Three_Entries_Type ; > > Three_Entries : Three_Entries_Type ; > > procedure Start ; > > end T123_Pack ; > -------------------------------------- > with Text_Io ; > package body T123_Pack is > > task body Three_Entries_Type is > > begin > > accept Start ; > > Text_Io.Put_Line("Start"); > > loop > > select > > accept One do > > Text_Io.Put_Line("One"); > > end ; > > or > > accept Two do > > Text_Io.Put_Line("Two"); > > end ; > > or > > accept Three do > > Text_Io.Put_Line("Three"); > > end ; > > loop > null ; > delay(0.02); > end loop ; > > end select ; -- select > > end loop ; > > end Three_Entries_Type ; > > procedure Start is > > begin > Three_Entries.Start ; > end ; > > end T123_Pack ; > > -------------------------------------- > -- main procedure > -------------------------------------- > with T123_Pack ; > > procedure T123 is > > begin > > T123_Pack.Three_Entries.Start ; > T123_Pack.Three_Entries.Three ; > T123_Pack.Three_Entries.One ; > > loop > T123_Pack.Three_Entries.Three ; > T123_Pack.Three_Entries.Two ; > delay(0.02) ; > end loop ; > > end T123 ; >