home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / lang / rexx / 1493 next >
Encoding:
Text File  |  1993-01-21  |  1.4 KB  |  38 lines

  1. Newsgroups: comp.lang.rexx
  2. Path: sparky!uunet!mcsun!sunic!fuw.edu.pl!cocos!jt
  3. From: jt@fuw.edu.pl (Jerzy Tarasiuk)
  4. Subject: Re: Lower-case alphabetic set
  5. In-Reply-To: MCMASTER@LSTC2VM.stortek.com's message of Wed, 6 Jan 1993 16:03:11 GMT
  6. Message-ID: <JT.93Jan21143931@fizyk1.fuw.edu.pl>
  7. Sender: news@fuw.edu.pl
  8. Nntp-Posting-Host: fizyk1
  9. Organization: Warsaw University Physics Dept.
  10. References: <1993Jan5.064658.4491@schbbs.mot.com> <16B4E7F50.MCMASTER@LSTC2VM.stortek.com>
  11. Date: Thu, 21 Jan 1993 13:39:31 GMT
  12. Lines: 24
  13.  
  14. >>>>> On Wed, 6 Jan 1993 16:03:11 GMT, MCMASTER@LSTC2VM.stortek.com (Jim McMaster) said:
  15. Jim> Nntp-Posting-Host: lstc2vm.stortek.com
  16. Jim> In article <1993Jan5.064658.4491@schbbs.mot.com>
  17. Jim> TCSAR03@waccvm.corp.mot.com (Germain Leutwyler) writes:
  18. >Here is another routine to translate each letter from uppercase to
  19. >lowercase. You may specify the characters that shouldn'tbe converted
  20. >in the verify function.
  21. >/* TRANSLATION OF CERTAIN CHARACTERS WITHIN STRING "ST" TO LOWERCASE */
  22. >ST=''
  23. >do P=1 to length(ST)
  24. > C=substr(ST,P,1)
  25. > if verify(C,'?!0123456789')/=0 then C=bitxor(C,' ')
  26. > ST=ST||C
  27. >end
  28.  
  29. It would be better to use verify to check if character belongs to
  30. uppercase alpha:
  31.     if verify(C,'ABCDEFGHIJKLMNOPQRSTUVWXYZ')=0 then C=bitxor(C,' ')
  32.  
  33. Jim> This works, but only for EBCDIC, and is much slower than the built-in
  34. Jim> translate function.
  35.  
  36. This works for ASCII, too. ASCII 'A'=0x41,'a'=0x61,' '=0x20
  37.                EBCDIC 'A'=0xC1,'a'=0x81,' '=0x40
  38.