Paul
2007-12-18 12:28:28 UTC
Hi, given the following two simple programs
hello.adb
-----------------------
with ada.text_io;
procedure hello is
begin
ada.text_io.put("hello");
end hello;
-----------------------
hello.c
-----------------------
#include <stdio.h>
int main()
{
printf("hello");
}
-----------------------
the result for the ada program is:
-----------------------
$ ./hello_in_ada
hello
$
-----------------------
and for the c program:
-----------------------
$ ./hello_in_c
hello$
-----------------------
The c program does not print a new-line, but the ada program does.
Is there any way to make the ada program not print a new-line?
And is this behavior part of the Ada standard or is it just part of gnat?
I looked for answers, but found none.
Thanks,
Paul Zacharzewski
hello.adb
-----------------------
with ada.text_io;
procedure hello is
begin
ada.text_io.put("hello");
end hello;
-----------------------
hello.c
-----------------------
#include <stdio.h>
int main()
{
printf("hello");
}
-----------------------
the result for the ada program is:
-----------------------
$ ./hello_in_ada
hello
$
-----------------------
and for the c program:
-----------------------
$ ./hello_in_c
hello$
-----------------------
The c program does not print a new-line, but the ada program does.
Is there any way to make the ada program not print a new-line?
And is this behavior part of the Ada standard or is it just part of gnat?
I looked for answers, but found none.
Thanks,
Paul Zacharzewski