Re: variable start values
- Posted by Pete Lomax <petelomax at blueyonder.co.uk> Dec 10, 2003
- 491 views
On Thu, 11 Dec 2003 07:51:20 +1100, Derek Parnell <ddparnell at bigpond.com> wrote: > > >----- Original Message ----- >From: "Ron Austin" <ronaustin at alltel.net> >To: <EUforum at topica.com> >Subject: RE: variable start values > > >> Pete Lomax wrote: >> > >> > >> > On Wed, 10 Dec 2003 16:33:19 +0000, Jason Dube >> > <dubetyrant at hotmail.com> wrote: >> > >> > > if x[1][1] < 90 then >> > >> > It took me a moment to figure that out. I suggest you use >> > "if x[1][1] < 'Z' then" instead, and probably <= as well. >> > >> > Regards, >> > Pete >> > If he wants to trap non capital letters shouldn't it be <65 or > 90 -- >> > <'A' or >'Z' this would trap lower case plus misc numbers, punctuation , >> > etc. >> > >I believe that > > if find(x[1][1], upper_case_chars) = 0 then > >is the safest method, because it does not restrict itself to ASCII coding or to >English. All that is needed is to load the sequence 'upper_case_chars' with the >values that the current user believes are uppercase characters at runtime. The >default can be "ABCDEFGHIJKLMNOPQRSTUVWXYZ" but should be changable under user >control. Yep. My favored method is: sequence charset charset=repeat(ILLEGAL,256) charset['A'..'Z']=UPPER then, if charset[x[1][1]]=UPPER obviously, ILLEGAL=-1, UPPER=7 (etc) as previously defined constants. Pete