comp.lang.ada
 help / color / mirror / Atom feed
From: Trish Cayetano <trishacayetano@gmail.com>
Subject: After typing input of Integer it SKIPS getting the inputs of String.
Date: Sat, 11 Jul 2015 08:14:04 -0700 (PDT)
Date: 2015-07-11T08:14:04-07:00	[thread overview]
Message-ID: <4ab70bc8-b25f-4dc4-88d9-d7021c2bed30@googlegroups.com> (raw)

Code:
with ada.Text_IO; use ada.Text_IO;
with ada.Integer_Text_IO; use ada.Integer_Text_IO;
procedure Main is

    
   inputText: String (1..10);
   inputNmbr : Integer;
   StringNatural: Integer;  
begin
  
   Put_Line("Enter Integer");
   Get(inputNmbr,1);
   Put_Line("Enter String");
   Get_Line(inputText,StringNatural);
   Put_Line("===================");
   Put("Input for Integer: ");
   Put(inputNmbr,1);
   Put_Line("");
   Put_Line("Input for String: ");
   Put_Line(inputText(1..StringNatural));

end Main;

OUTPUT:

Enter Integer
2
Enter String
===================
Input for Integer: 2
Input for String: 


[2015-07-11 23:01:00] process terminated successfully, elapsed time: 00.86s

             reply	other threads:[~2015-07-11 15:14 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-11 15:14 Trish Cayetano [this message]
2015-07-11 15:36 ` After typing input of Integer it SKIPS getting the inputs of String Niklas Holsti
2015-07-11 18:05 ` Jeffrey R. Carter
replies disabled

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