[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference turris::ada

Title:DEC Ada
Notice:Ada is no longer a trademark of the US Government
Moderator:KMOOSE::CMCCUTCHEON
Created:Mon Jan 27 1986
Last Modified:Fri Jun 06 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:3874
Total number of notes:16668

3840.0. "Problem whith Text_Io.Put (no flush) - Dec Ada V3.3. Unix V4.0A" by AUBER::LORENZO (Philippe LORENZO: EVRY FRANCE TSSC Ultrix) Fri Feb 07 1997 07:18

    Hello,

    Using ADABASE330 and ADALIB401, the following sample doesn't work as it
    should. The prompt is written only after the input. It worked Unix 3.2
    and Ada 3.2.

-------------------------------------------------------------------
-- Input.ada
with Text_IO;

procedure Input is
    chaine : String(1..80);
    reponse : String(1..80);
    fin : Natural;
begin
    Text_IO.Put("Question > ");
    -- Text_IO.Put_line("Question > ");
    Text_IO.Get_line(chaine, fin);
    Text_IO.Put_line("Reponse  > " & chaine(1..fin));
end Input;
-------------------------------------------------------------------
Wrong execution:
$ input33
answer
Question > Reponse  > answer
$
Good execution:
$ input32
Question > answer
Reponse  > answer
$

    Is it a known / fixed problem, or do i make any mistake (just an Ada new
    user).

    Thanks for help,

Philippe.
T.RTitleUserPersonal
Name
DateLines
3840.1I've reproduced itFLOYD::YODERMFYMon Feb 10 1997 18:404
I get the "good" behavior on Unix 3.0, the "bad" behavior on 3.2G and 4.0. 
Which version of 3.2 were you using?

I am almost (but not absolutely) sure this is a bug.
3840.2KMOOSE::CMCCUTCHEONCharlie McCutcheonTue Feb 11 1997 15:059
Let me know if this is a "hot" issue needing immediate attention.

We're tossing other items about at the moment.  ;-)

(I'd also need to understand from Mike what works and doesn't to figure
out if Ada or Unix made a change which breaks you...)

Charlie

3840.3Whish either a solution or a workaroundAUBER::LORENZOPhilippe LORENZO: EVRY FRANCE TSSC UltrixThu Feb 13 1997 10:2815
	
	Hey,

	Yes, my customer needs a solution (existing code) or
	a workaround.

	I don't know if the problem is with Unix or Ada version.

	It works with Unix V3.2G, ADAECO320, does not work with
	Unix V4.0A, ADA 3.3. Did not try whith ADA 3.3 and 
	Unix V3.2G.

	Thanks for your answers.

Philippe
3840.4This is now officially hotPEACHS::DALEYMaybe I should drink more coffee...or less!Tue Mar 04 1997 17:1631
Hi,

I have a customer who's called us at the CSC about this.  He sent
in an example which I assume is the same issue (not knowing much about
ADA):

with Text_IO;
procedure Test_Input is

   CRLF      : constant String(1..2) := ASCII.CR & ASCII.LF;
   The_Input  : String(1..80);
   The_Length : Integer;

begin

   Text_IO.Put_Line("");
   Text_IO.Put("This is a Test Prompt " & CRLF & "Enter Here => ");
   Text_IO.Get_Line(The_Input, The_Length);

   Text_IO.Put_Line("");
   Text_IO.Put_Line("The Input Was: " & The_Input(1..The_Length));

end Test_Input;

Is this fixed?  If not, I'll escalate, as this customer is looking for
a fix soon.

Regards,

John Daley
Digital CSC
3840.5Bug: yes, Ada: probably notKMOOSE::CMCCUTCHEONCharlie McCutcheonWed Mar 05 1997 17:4814
>Is this fixed?  If not, I'll escalate, as this customer is looking for
>a fix soon.

It is not fixed in V3.3 on Digital UNIX 3.2G or 4.0B, I just tried it.

From Mike's reply .1, it sounds like OSF/1 3.0 (old version) works.
This means that its a problem in some UNIX supplied library, not Ada.

We agree its a bug, but from what I see, if it gets assigned to us,
we'll merely be looking for the correct product to get it assigned to.

Also, please warn me if this will become a CLD.

Charlie
3840.6Which kind of UNIX supplied library?AUBER::LORENZOPhilippe LORENZO: EVRY FRANCE TSSC UltrixMon Mar 10 1997 14:2417
	Hello,

> From Mike's reply .1, it sounds like OSF/1 3.0 (old version) works.
> This means that its a problem in some UNIX supplied library, not Ada.

	If it works with OSF/1 3.0, can it be built with Ada V3.3 (I believed
	that D.U V3.2G was the first supported release with Ada V3.3.

	And also, you reproduced it with D.U V3.2G and Ada V3.3, but I tried
	with D.U V3.2G and AdaEco320, and there is no problem.
	
	So which kind of Unix suplied libraries are you thinking about?

	Thanks again,

Philippe/
3840.7Warning! Incoming CLDPEACHS::DALEYMaybe I should drink more coffee...or less!Mon Mar 10 1997 16:525
I'm CLD'ing this...fix needed for customer.

Thanks,

John
3840.8KMOOSE::CMCCUTCHEONCharlie McCutcheonMon Mar 10 1997 17:4128
>	If it works with OSF/1 3.0, can it be built with Ada V3.3 (I believed
>	that D.U V3.2G was the first supported release with Ada V3.3.

We didn't do much testing of Ada V3.3 on OSF/1 3.0.  It probably works,
but with UNIX we typically have to test on EVERY version, since it and
DECthreads tends to vary greatly for using Ada.  My view is that OSF/1 3.0
was very stable.

>	And also, you reproduced it with D.U V3.2G and Ada V3.3, but I tried
>	with D.U V3.2G and AdaEco320, and there is no problem.

Very strange.  This could be an issue where the generated code makes a
big difference (since memory would be different depending on the machine
instructions).

>	So which kind of Unix suplied libraries are you thinking about?

I've seen Ada reported problems which are fixed in different versions
of pthreads, libexc, libc, etc..  They tend to be difficult and tedious
for us to figure out, then transfer to the actual group who has the problem.

>I'm CLD'ing this...fix needed for customer.

Oh boy.  ;-)  We do fix things without CLD's, but I understand this to be a
hot issue.  Sorry to say that you're not the only CLD Ada is working on at
the moment...  Thanks for the warning.

Charlie
3840.9Reported as IPMT HPAQ30H7FKMOOSE::CMCCUTCHEONCharlie McCutcheonTue Mar 11 1997 16:293
I'll take this offline and communicate through IPMT until we solve this issue.

Charlie
3840.10KMOOSE::CMCCUTCHEONCharlie McCutcheonTue Mar 11 1997 18:477
A temporary workaround for this problem is to replace DEC Ada V3.3
predefined library unit low_level_io.ada with the DEC Ada V3.2 version
of the same unit.

We are analyzing the problem between the versions.

Charlie
3840.11Help about the WorkaroundAUBER::LORENZOPhilippe LORENZO: EVRY FRANCE TSSC UltrixWed Mar 12 1997 13:5913
	Thanks for your answer,

	Can you briefly tell me how to replace this libary unit.

	Something to do whith /usr/lib/cmplrs/ada/lib/adalib,

	but I don't know which files (acu, .o, adc, axref) ?

	
	Thanks for help

Philippe.
3840.12the file you need is low_level_io.ada in PALFLOYD::YODERMFYWed Mar 12 1997 18:381
You just need to compile a new body for low_level_io.
3840.13IPMT case has directionsKMOOSE::CMCCUTCHEONCharlie McCutcheonWed Mar 12 1997 23:2317
>	Can you briefly tell me how to replace this libary unit.

This should be in the update to the IPMT case, along with the
V3.2 source.

The predefined source is contained in the Ada library, and you 
can use regular "ada" compile commands, once you set your library
to be the system predefined library.  Or you can compile into
a local library (for testing).

We are continuing to evaluate the V3.3 source to come up with a
V3.3 fix to both problems.

Mail me offline if you still have problems.  I'm typing from home
where its more difficult to cut & paste directory names... ;-)

Charlie