comp.lang.ada
 help / color / mirror / Atom feed
* Interger_io get and Text_io.Get_line
@ 2003-10-16 20:12 CheGueVerra
  2003-10-16 20:22 ` CheGueVerra
  0 siblings, 1 reply; 7+ messages in thread
From: CheGueVerra @ 2003-10-16 20:12 UTC (permalink / raw)


I figured out who to play with the strings and get the desired length out of
my strings, but now I have an other trouble.

When I try to Get an Integer and then Get_line a String, the Integer works
great, but it seems to jumps over the Get_line.

[Code Snippet]
with Text_io;
use Text_io;

Procedure TestString is
 subType MyString is string(1..10);

 package Entiers is new Text_io.Integer_io (Num => Integer);

   Last   : Natural := 0;
   TstStr : MyString;
 Number : integer;
begin
 Put_line("Test of string 10");
 Put_line("Enter a number");
 Entiers.get(Number);
 New_line;
 Put_line("Enter a string");
 ====
 it seems to skip this line and go directly to the Put_line
 Get_Line(TstStr, Last);
 =====
 Put_line(TstStr(TstStr'First..TstStr'Last));
 Entiers.Put(Number);
end TestString;


So, I figure that I'm doing something wrong  AGAIN, and been trying to
figure what, but after a couple of hours trying I'm getting really mad with
myself and ada, I feel like I can't even write code anymore, because this is
really basic stuff and I can't seem to figure it out

CheGueVerra





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

end of thread, other threads:[~2003-10-17  5:59 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-10-16 20:12 Interger_io get and Text_io.Get_line CheGueVerra
2003-10-16 20:22 ` CheGueVerra
2003-10-16 23:31   ` Robert I. Eachus
2003-10-17  1:01   ` Jeffrey Carter
2003-10-17  1:15     ` CheGueVerra
2003-10-17  5:08     ` Anders Wirzenius
2003-10-17  5:59       ` Anders Wirzenius

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