From: "CheGueVerra" <chegueverra@hotmail.com>
Subject: Interger_io get and Text_io.Get_line
Date: Thu, 16 Oct 2003 16:12:59 -0400
Date: 2003-10-16T16:12:59-04:00 [thread overview]
Message-ID: <bZCjb.4890$Z_2.406431@news20.bellglobal.com> (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
next reply other threads:[~2003-10-16 20:12 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-10-16 20:12 CheGueVerra [this message]
2003-10-16 20:22 ` Interger_io get and Text_io.Get_line 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
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox