comp.lang.ada
 help / color / mirror / Atom feed
* string manipulation
@ 2002-12-07 23:14 Gep
  2002-12-07 23:20 ` Gep
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Gep @ 2002-12-07 23:14 UTC (permalink / raw)


Is it possible to declare a string to be exactly 10 characters long and
still be a variable? then
for example

declare V_string as being exactly 10 characters


while not valid
loop
get_line(V_string, V_length);

if v_Art_lng = t_Art_article.t_art_proprietaire.v_nas'length then
      Skip_Line;
      Valid := True;
else
    valid :=false;
    Put("invalid");
end if;

end loop;

anything not in the range of declared string (in this case being10) would be
declared as invalid...any ideas?
I dont want to to have any explicit statement of 10 like "if V_length = 10
then"    in this little procedure as it will be getting strings of various
length.





^ permalink raw reply	[flat|nested] 10+ messages in thread
* String Manipulation
@ 1998-09-22  0:00 SiliconJesus
  1998-09-23  0:00 ` David C. Hoos, Sr.
  0 siblings, 1 reply; 10+ messages in thread
From: SiliconJesus @ 1998-09-22  0:00 UTC (permalink / raw)


I have run into a problem while writing a recent program.

I have a field in a record called name, which when I get input from a
specified data file it's Lastname, First well the problem is not in
inputting it, but when I update this record from another file, only the
last name is given.  So how do I read a character at a time and put only
the last name in a temp variable so I can compare the two names so that
the rest of the record gets updated.


Thanks


		
				,.   '\'\    ,---.
				| \\  l\\l_ //    |     ~NARF!!
				|  \\/ `/  `.|    |      
				| Y |   |   ||  Y |      
				|  \|   |   |\ /  |      
				\   |  o|o  | >  /       
				 \___\_--_ /_/__/        
				 /.-\(____) /--.\        
				 `--(______)----'
				     U// U / \
				     / \  / /|           		   
==========================================================================
|    John M. Softich                | " I wanna live, I wanna love       |
|  softichj@cs.montana.edu          |      but it's a long hard          |
|  Montana State University         |       road out of hell! "          |
|  Http://cs.montana.edu/~softichj  |                ~Manson             |
==========================================================================





^ permalink raw reply	[flat|nested] 10+ messages in thread
* String Manipulation
@ 1998-04-08  0:00 Howard Davies
  0 siblings, 0 replies; 10+ messages in thread
From: Howard Davies @ 1998-04-08  0:00 UTC (permalink / raw)



Hi,

Many thanks to the two guys who took the time to suggest packages and
functions I should look at to manipulate strings in Ada. It proved to be
a great help and helped me solve my problems.
Its good to know that there are still some decent folks around.

Thanks again
-- 
Howard Davies           Howard@roslyn.demon.co.uk




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

end of thread, other threads:[~2002-12-08 18:34 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-12-07 23:14 string manipulation Gep
2002-12-07 23:20 ` Gep
2002-12-08  2:24   ` Jeffrey Carter
2002-12-08 18:34     ` Gep
2002-12-08 14:02   ` Marin David Condic
2002-12-08  0:07 ` Jacob Sparre Andersen
2002-12-08  0:12 ` James S. Rogers
  -- strict thread matches above, loose matches on Subject: below --
1998-09-22  0:00 String Manipulation SiliconJesus
1998-09-23  0:00 ` David C. Hoos, Sr.
1998-04-08  0:00 Howard Davies

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