Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!elroy.jpl.nasa.gov!lll-winken!iggy.GW.Vitalink.COM!widener!msi.umn.edu!noc.MR.NET!gacvx2.gac.edu!hhdist From: @vms3.macc.wisc.edu:KAUFMAN@ETHL.DecNet (KAUFMAN) Newsgroups: comp.sys.handhelds Subject: RE: Good ways to... Message-ID: <21042121491070@vms3.macc.wisc.edu> Date: 22 Apr 91 02:49:00 GMT Lines: 42 Return-path: To: handhelds@gac.edu X-VMS-To: @[KAUFMAN]COMP_SYS On 20 Apr 91 22:25:45 GMT b2676870@soph.cs.ubc.ca (wilson w ma) writes: >My second question is about converting strings from mixed case to uppercase >only. I've written the following but it's too slow. Is there anyway to speed [program deleted] How about this? STRUP [4E04] << DUP SIZE 1 SWAP FOR i DUP i DUP SUB NUM DUP DUP 96 > SWAP 123 < AND IF THEN 32 - CHR SWAP DUP 1 i 1 - SUB SWAP DUP SIZE i 1 + SWAP SUB 3 ROLLD SWAP + SWAP + ELSE DROP END NEXT >> This of course was written on an HP28S and typed in manually. I do not think there are any typos (famous last words). On my 28S it goes at approximately .1 s/char with a string of all lowercase (.05 s/char with all uppercase). I don't know if this is fast or slow, you be the judge. Have fun! TheSeeker DAK ______________________ / . _____ . \ ____________________________________________________ . |<__|/ . | | Internet: dkaufman@vms.macc.wisc.edu | . | |/ . | | Bitnet: dkaufman@wiscmacc | . ---/- . | \ SnailMail: 1820 Summit Avenue Madison, WI 53705 | . __/__ . | \--\ 'Two shift keys? That's stupid.' | . |/_>| . | \ HP /--\ 28S /--\ IS /--\ THE /-\ KEY /------ . /| | . | \__/ \___/ \__/ \___/ \___/ | . /-----. . | \______________________/