* integer input from text file @ 2003-03-27 13:35 dumur 2003-03-27 18:41 ` Randy Brukardt 2003-03-27 20:19 ` Jeffrey Carter 0 siblings, 2 replies; 4+ messages in thread From: dumur @ 2003-03-27 13:35 UTC (permalink / raw) My problem is that I got to read a time string from a text file. It is in the form 12:34:45 Hour:Minute:Second. I want to get each part one by one with Ada.Integer_Text_IO.Get(File=>input_file, Item=> Hour); Skip; -- skips the ":" character Ada.Integer_Text_IO.Get(File=>input_file, Item=> Minute); Skip; Ada.Integer_Text_IO.Get(File=>input_file, Item=> Second); But the colons(:) troubles me here. If I use "," or "." instead of colons it works but there will be colons in the input. What is the problem? Is there any special meaning of colons(:) in Ada? Thanks. ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: integer input from text file 2003-03-27 13:35 integer input from text file dumur @ 2003-03-27 18:41 ` Randy Brukardt 2003-03-27 20:19 ` Jeffrey Carter 1 sibling, 0 replies; 4+ messages in thread From: Randy Brukardt @ 2003-03-27 18:41 UTC (permalink / raw) dumur wrote in message <363a9d17.0303270535.427f82e@posting.google.com>... ... > Is there any special meaning of colons(:) in Ada? Thanks. Yes. See J.2(3) in the RM. Randy. ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: integer input from text file 2003-03-27 13:35 integer input from text file dumur 2003-03-27 18:41 ` Randy Brukardt @ 2003-03-27 20:19 ` Jeffrey Carter 2003-03-28 6:11 ` dumur 1 sibling, 1 reply; 4+ messages in thread From: Jeffrey Carter @ 2003-03-27 20:19 UTC (permalink / raw) dumur wrote: > My problem is that I got to read a time string from a text file. It is > in the form 12:34:45 Hour:Minute:Second. I want to get each part one > by one with 12:34:45 is equivalent to 12#34#45, that is, the base-12 number 34 (40 decimal) followed immediately by the base-10 number 45. If you have a 24-hour clock, hours of 00-01 and 17-23 will cause errors because Ada only does bases of 2-16 automatically. You probably ought to read the whole string and parse it yourself. -- Jeff Carter "Now look, Col. Batguano, if that really is your name." Dr. Strangelove ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: integer input from text file 2003-03-27 20:19 ` Jeffrey Carter @ 2003-03-28 6:11 ` dumur 0 siblings, 0 replies; 4+ messages in thread From: dumur @ 2003-03-28 6:11 UTC (permalink / raw) thank you, I got the point. ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2003-03-28 6:11 UTC | newest] Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2003-03-27 13:35 integer input from text file dumur 2003-03-27 18:41 ` Randy Brukardt 2003-03-27 20:19 ` Jeffrey Carter 2003-03-28 6:11 ` dumur
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox