Posted: Thu Nov 18, 2004 7:44 pm Post subject: Re: range of letters help? plz
pokerface wrote:
i want to make a if statement that has a range of letters
example:
code:
if word (i) = (*a* all the way to *z*) then etc...
how do i do this?
code:
if ord (input) >= ord ('a') and ord (input) <= ord ('z') then
put "lower-case character"
end if
pokerface
Posted: Thu Nov 18, 2004 7:54 pm Post subject: (No subject)
Thanks You guys rock! that was very useful! i could do the same thing with symbols right?
well ill just have to experiment! but thanks for ur time! thanks!!!!!
wtd
Posted: Thu Nov 18, 2004 8:19 pm Post subject: (No subject)
Consider:
code:
function isBetween (ch, first, last : char) : boolean
result ord (ch) >= ord (first) and ord (ch) <= ord (last)
end isBetween
code:
if isBetween ('M', 'A', 'Z') then
% yada yada
end if
pokerface
Posted: Thu Nov 18, 2004 10:20 pm Post subject: (No subject)