comp.lang.ada
 help / color / mirror / Atom feed
From: mfeldman@seas.gwu.edu (Michael Feldman)
Subject: Re: is there a 'wait' command in Ada
Date: 1996/12/02
Date: 1996-12-02T00:00:00+00:00	[thread overview]
Message-ID: <57v7l0$i2@felix.seas.gwu.edu> (raw)
In-Reply-To: dewar.849498825@merv


In article <dewar.849498825@merv>, Robert Dewar <dewar@merv.cs.nyu.edu> wrote:
>Mike said
>
>Ah ha! "don't work under our scripts", so just possibly this is a Feldman
>scriopt issue and not a fundamental Ada issue :-)
>
Well, the problem manifests itself in our script situation, but the
scripts are not the cause of the problem. 

I never said any of this was a fundamental Ada issue. I _did_ say (and
did mean) that the behavior is sometimes surprising.

In running GNAT under GDB, things like simple delays do not behave as 
expected (try it). And a simple delay, followed by a simple Put, does
NOT always display the message after exactly that amount of time.
Things like IO buffering give unexpected results. 

These are neither bugs nor fundamental Ada issues, rather implementation
issues, but they bite nonetheless. They especially bite people who are 
trying to move over from other languages and to understand just what the 
RM means.

The original question was NOT "what is the Ada equivalent of pause", but 
"how do I get my program to pause for 5 seconds, then display a message 
on the screen". The answer "the delay statement" gives a partial answer only.

I stand by my answer, "the delay statement is part way to a solution, but
unless we know the platform and compiler, we can't say for sure."

Robert (or anyone else), if this is so easily and portably done (including 
under a debugger like GDB), please post a short program illustrating it. 
My answer was neither idle nor completely uninformed, but you may have a 
solution I didn't think of. Instead of joking around, write a complete
little program that compiles and (portably) shows the desired behavior.

I stand by the second part of the answer too, which is "GNAT should not be
hauling tasking code into a program that does only a simple delay but
no tasking." This is an implementation decision that causes lots of
needlesss grief to those trying to debug simple sequential programs.
Maybe it will be fixed someday.

Mike Feldman




  parent reply	other threads:[~1996-12-02  0:00 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-11-29  0:00 is there a 'wait' command in Ada ***** LOTUS *****
1996-11-29  0:00 ` Robert A Duff
1996-11-30  0:00 ` Michael Feldman
1996-11-30  0:00   ` Robert Dewar
1996-12-01  0:00     ` Michael Feldman
1996-12-01  0:00       ` Robert Dewar
1996-12-02  0:00         ` Larry Kilgallen
1996-12-02  0:00         ` Michael Feldman [this message]
1996-12-02  0:00       ` David C. Hoos, Sr.
1996-12-09  0:00         ` Fergus Henderson
1996-12-02  0:00 ` Corey Minyard
1996-12-03  0:00   ` Robert A Duff
1996-12-03  0:00   ` Michael Feldman
1996-12-03  0:00   ` Larry Kilgallen
1996-12-03  0:00     ` Michael Feldman
1996-12-04  0:00       ` Larry Kilgallen
1996-12-03  0:00 ` Corey Minyard
1996-12-04  0:00   ` Keith Thompson
1996-12-04  0:00   ` Robert Dewar
1996-12-10  0:00 ` Robert I. Eachus
  -- strict thread matches above, loose matches on Subject: below --
1996-11-29  0:00 tmoran
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox