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,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,9cb6352457d1c6de X-Google-Attributes: gid103376,public From: mfeldman@seas.gwu.edu (Michael Feldman) Subject: Re: is there a 'wait' command in Ada Date: 1996/12/02 Message-ID: <57v7l0$i2@felix.seas.gwu.edu>#1/1 X-Deja-AN: 202019627 references: <57smdo$9qv@felix.seas.gwu.edu> organization: George Washington University newsgroups: comp.lang.ada Date: 1996-12-02T00:00:00+00:00 List-Id: In article , Robert Dewar 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