comp.lang.ada
 help / color / mirror / Atom feed
From: dewar@cs.nyu.edu (Robert Dewar)
Subject: Re: End of Line Question
Date: 1996/07/12
Date: 1996-07-12T00:00:00+00:00	[thread overview]
Message-ID: <dewar.837199117@schonberg> (raw)
In-Reply-To: 4s5hdb$hmb@news3.digex.net


Mike said

"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 ..."


This is wrong on two counts, first of all reading with TExt_IO you will
not see carriage return characters.

Second of all, there is no guarantee that CR's appear at the end of each
line in any case, and, glaringly obviously!, all Unix systems use LF as
the end of line character, not CR.

So this suggestion is completely wrong -- stick to the end_of_line test,
that is precisely what it is there for.





  parent 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
1996-07-12  0:00     ` Robert Dewar
1996-07-12  0:00   ` Robert Dewar [this message]
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