comp.lang.ada
 help / color / mirror / Atom feed
From: "Kevin J. Weise" <kweise@c3i-ccmail.sed.redstone.army.mil>
Subject: Re: End of Line Question
Date: 1996/07/12
Date: 1996-07-12T00:00:00+00:00	[thread overview]
Message-ID: <4s66so$ehr@michp1.redstone.army.mil> (raw)
In-Reply-To: 4s5hdb$hmb@news3.digex.net


Mike Ibarra <ibarra@mccabe.com> wrote:
>You could test for this a couple of different ways.  In Ada83, package ASCII 
>contains identifiers for all ASCII control characters.  So you could test:
>IF ch = ASCII.cr THEN ...

Sorry, Michael, can't do this.  The Ada83 LRM talks about line terminators and page 
terminators, but does not specify what they are (or should be).  Text_IO will 
definitely *not* return them to you.

>
>Or you could just test for end of line:
>WHILE ( not End_Of_Line ) LOOP...
>

This is the preferred method.  It is a function in Text_IO (i.e., 
Text_IO.End_of_Line).  There's also a version that accepts a file parameter, in case 
you're reading a real disk file and not from standard input.  Check out Chapter 14 
in the LRM.

>Hope this helps
>-- 
>Michael Ibarra
>

Kevin J. Weise                email:  kweise@sed.redstone.army.mil
COLSA Corporation             voice:  (205)842-9680

.. standard disclaimers apply






  reply	other threads:[~1996-07-12  0:00 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-07-12  0:00 End of Line Question Spasmo
1996-07-12  0:00 ` Mike Ibarra
1996-07-12  0:00   ` Kevin J. Weise [this message]
1996-07-12  0:00     ` Robert Dewar
1996-07-12  0:00   ` Robert Dewar
1996-07-15  0:00   ` Nasser Abbasi
1996-07-14  0:00 ` Andy Askey
replies disabled

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