Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!cs.utexas.edu!uwm.edu!psuvax1!rutgers!mit-eddie!uw-beaver!ubc-cs!soph.cs.ubc.ca!b2676870 From: b2676870@soph.cs.ubc.ca (wilson w ma) Newsgroups: comp.sys.handhelds Subject: Good ways to... Summary: How to delete from a list and convert to upper case Keywords: delete list lower-case conversion Message-ID: <1991Apr20.222545.12776@soph.cs.ubc.ca> Date: 20 Apr 91 22:25:45 GMT Sender: news@soph.cs.ubc.ca (Usenet News) Followup-To: comp.sys.handhelds Organization: Soph Lab, CPSC, UBC, Vancouver, B.C., Canada Lines: 46 Originator: b2676870@eutsuk.soph.cs.ubc.ca Hello. I've got two questions about RPL. How is one suppose to delete elments from a list? I.e., if I've a list of say 10 items and want to delete the 5th item, how do I do it? I've RTFM over and over and can't find any command that does this. You can use + to add to a list but there is no such command for removing. I've cooked up the following but is this optimal? \<< \-> l n \<< l OBJ\-> m \<< IF n 1 \>= n m \<= AND THEN m n - 1 + ROLL DROP m 1 - \->LIST ELSE m \->LIST END \>> \>> \>> 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 it up? (Would it be too much to ask of any one of the ML hotshots to redo this? ;) I've tried to replace the IF DUP THEN sequence with an IFERR but that was slower. \<< DUP SIZE 1 SWAP FOR i DUP i DUP SUB "ABCDEFGHIJKLMNOPQRSTUVWXYZ" "abcdefghijklmnopqrstuvwxyz" ROT POS IF DUP THEN DUP SUB i SWAP REPL ELSE DROP2 END NEXT \>> Any suggestions on the above would be appreciated. George