comp.lang.ada
 help / color / mirror / Atom feed
* Re: gnat: time-slicing
@ 2002-07-18  4:44 Grein, Christoph
  2002-07-18 18:55 ` Jan Prazak
  0 siblings, 1 reply; 44+ messages in thread
From: Grein, Christoph @ 2002-07-18  4:44 UTC (permalink / raw)


From: Jan Prazak <janp9@gmx.net>

>> When you don't specify a file parameter to Put_Line, it writes to
>> Current_Output which, if you haven't changed it, is Standard_Output.
>> Text_IO *always* writes to a file. Duh.
>
>If it's true, then the Linux console/terminal is a file. Duhuhuh. :)
>No, seriously, explain it a bit more. As far as I know, a terminal is a
>device in Linux, which is some kind of a file, maybe you mean this. When
>I run the program in konsole (KDE xterm), the output is on the screen,
>and that's logical, because I haven't specified a file in Put_Line.

Before arguing, please have a look at the Ada Reference Manual...

For the RM, the screen _is_ a file, named Standard_Output; and the keyboard is 
also a file, named Standard_Input. (Actually the RM does not specify what 
Standard_Output and Standard_Input stand for since this is OS dependent, it only 
says that there are these two files.)

You urgently need the RM. Go get it :-)



^ permalink raw reply	[flat|nested] 44+ messages in thread
* gnat: time-slicing
@ 2002-07-15 11:25 Jan Prazak
  2002-07-15  8:44 ` Dale Stanbrough
                   ` (3 more replies)
  0 siblings, 4 replies; 44+ messages in thread
From: Jan Prazak @ 2002-07-15 11:25 UTC (permalink / raw)


Hello,

I have seen this example program in a tutorial:

------------
with Ada.Text_IO; use Ada.Text_IO;

procedure Task_Demo is
  task A;
  task body A is
  begin
    Put_Line("b");
    Put_Line("b");
  end A;
begin
  Put_Line("a");
  Put_Line("a");
end Task_Demo;
---------------

The output is:
a
a
b
b

But I want the output to be:

ab

ab

(the tutorial says that this is the output with enabled time-slicing)

I have tried to use -gnatT100, and -gnatT1, and pragma
Time_Slice(0.000001) etc., but none of this works.
I have gnat for Linux.

Jan




^ permalink raw reply	[flat|nested] 44+ messages in thread

end of thread, other threads:[~2002-07-31 22:28 UTC | newest]

Thread overview: 44+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-07-18  4:44 gnat: time-slicing Grein, Christoph
2002-07-18 18:55 ` Jan Prazak
2002-07-18 16:35   ` Sergey Koshcheyev
2002-07-19  1:37   ` Robert A Duff
  -- strict thread matches above, loose matches on Subject: below --
2002-07-15 11:25 Jan Prazak
2002-07-15  8:44 ` Dale Stanbrough
2002-07-15 19:10   ` Jan Prazak
2002-07-15 17:16     ` David C. Hoos
2002-07-15 23:30       ` Jan Prazak
2002-07-16  0:54         ` Jan Prazak
2002-07-16 10:46         ` Lutz Donnerhacke
2002-07-16 11:57           ` Aaro Koskinen
2002-07-16 12:57           ` SteveD
2002-07-16 15:18           ` Florian Weimer
2002-07-16 13:29     ` Marin David Condic
2002-07-17 19:29       ` Jan Prazak
2002-07-15 21:03 ` tmoran
2002-07-16 13:04   ` Jan Prazak
2002-07-16 21:29 ` Robert Dewar
2002-07-17 19:29   ` Jan Prazak
2002-07-17 16:44     ` Pascal Obry
2002-07-17 21:38       ` Jan Prazak
2002-07-17 19:21         ` Randy Brukardt
2002-07-17 22:44           ` Jan Prazak
2002-07-17 19:57             ` Marin David Condic
2002-07-18 18:38               ` Larry Kilgallen
2002-07-20 11:52                 ` Robert Dewar
2002-07-17 19:43         ` Pascal Obry
2002-07-18 18:55           ` Jan Prazak
2002-07-18 17:01             ` Pascal Obry
2002-07-18 17:03             ` Pascal Obry
2002-07-18 22:38         ` chris.danx
2002-07-18  2:50     ` R. Tim Coslet
2002-07-18 12:54       ` SteveD
2002-07-20 11:56       ` Robert Dewar
2002-07-18 12:02     ` Frank J. Lhota
2002-07-19  2:33 ` Robert A Duff
2002-07-19 13:32   ` Jan Prazak
2002-07-19 23:46   ` Keith Thompson
2002-07-20  0:36     ` Robert A Duff
2002-07-20  4:25       ` Darren New
2002-07-20 11:47     ` Robert Dewar
2002-07-21 10:58       ` Keith Thompson
2002-07-31 22:28       ` Robert A Duff

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