Re: Local variables controversial?
- From: "Julian V. Noble" <jvn@xxxxxxxxxxxx>
- Date: Thu, 21 Jul 2005 20:50:24 -0400
Ian Osgood wrote:
>
> ASCII trick:
>
> : toLower ( [A-Z] -- [a-z] ) $20 OR ;
I'd make sure it wasn't a character not in the range A-Z :
: >lower ( char -- lcase[a-z] | char )
DUP [CHAR] A MAX
OVER [CHAR] Z MIN = \ character in A-Z ?
32 AND OR \ 32 TRUE AND = 32, 32 FALSE AND = 0
;
--
Julian V. Noble
Professor Emeritus of Physics
jvn@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
^^^^^^^^^^^^^^^^^^
http://galileo.phys.virginia.edu/~jvn/
"For there was never yet philosopher that could endure the
toothache patiently."
-- Wm. Shakespeare, Much Ado about Nothing. Act v. Sc. 1.
.
- References:
- Local variables controversial?
- From: bobjaffray@xxxxxxxx
- Re: Local variables controversial?
- From: Jeff Fox
- Re: Local variables controversial?
- From: jch
- Re: Local variables controversial?
- From: Ian Osgood
- Local variables controversial?
- Prev by Date: Re: Local variables controversial?
- Next by Date: Re: Linux in Forth?
- Previous by thread: Re: Local variables controversial?
- Next by thread: Re: Local variables controversial?
- Index(es):
Relevant Pages
|