comp.lang.ada
 help / color / mirror / Atom feed
From: "Jeffrey R. Carter" <spam.jrcarter.not@spam.acm.org>
Subject: Re: loop on character
Date: Wed, 08 Oct 2008 22:45:45 GMT
Date: 2008-10-08T22:45:45+00:00	[thread overview]
Message-ID: <tKaHk.323199$TT4.111948@attbi_s22> (raw)
In-Reply-To: <401e3123-ddaf-4869-a58f-a36eca44ac8a@l33g2000pri.googlegroups.com>

Adam Beneschan wrote:
> 
> for C in Character range '0' .. '9' loop

You can also do

for C in Character'('0') .. '9' loop

which gives an interesting, if difficult to read, sequence of 3 apostrophes 
separated by other characters.

As long as the compiler knows the type of at least one of the literals it will 
be happy. As the OP pointed out, making at least one of them an object will do 
it. If he wants the literals in the loop statement, "Character range" would be 
my choice.

-- 
Jeff Carter
"Hello! Smelly English K...niggets."
Monty Python & the Holy Grail
08



  reply	other threads:[~2008-10-08 22:45 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-08 21:26 loop on character Bernd Specht
2008-10-08 21:42 ` Adam Beneschan
2008-10-08 22:45   ` Jeffrey R. Carter [this message]
2008-10-09 19:13   ` Jerry
2008-10-09 22:18     ` Adam Beneschan
2008-10-08 22:50 ` Robert A Duff
replies disabled

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