comp.lang.ada
 help / color / mirror / Atom feed
* Using STRING variable
@ 1998-05-20  0:00 JJ Lallemand
  1998-05-20  0:00 ` Dale Keim
  1998-05-21  0:00 ` Using STRING variable (in French) Jean-Pierre Rosen
  0 siblings, 2 replies; 4+ messages in thread
From: JJ Lallemand @ 1998-05-20  0:00 UTC (permalink / raw)



Hi,

First, sorry for my 'bad english' !

I am new in programming in ADA (ADA 95) and I have a little problem with
string var.


Here is a little program :


----------------------
with text_io; use text_io;

procedure main is
zz : string(1..20);
begin
   put(item=>"Enter your name: ");
   get(zz);
   put_line("hello " & zz);
end main;
-----------------------

The problem is that ADA wants exactly 20 characters ! How to enter less
characters ?

And when I "put" a string to an other ( text2 := text1 ) with  text1 :
string (1..20) and text2 : string(1..30), ADA raises a "constraint error"


Thank you for your help !

JJ







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

end of thread, other threads:[~1998-05-21  0:00 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-05-20  0:00 Using STRING variable JJ Lallemand
1998-05-20  0:00 ` Dale Keim
1998-05-21  0:00   ` John McCabe
1998-05-21  0:00 ` Using STRING variable (in French) Jean-Pierre Rosen

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