Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!dali.cs.montana.edu!uakari.primate.wisc.edu!samsung!noose.ecn.purdue.edu!stable.ecn.purdue.edu!yorkw From: yorkw@stable.ecn.purdue.edu (Willis F York) Newsgroups: comp.sys.amiga.programmer Subject: Re: Arexx programming help wanted Message-ID: Date: 24 Apr 91 16:30:30 GMT References: <18587@sdcc6.ucsd.edu> Sender: root@noose.ecn.purdue.edu (ECN System Management) Organization: Purdue University Engineering Computer Network Lines: 83 lindwall@beowulf.ucsd.edu (John Lindwall) writes: >1> I have a function which accepts a string as an argument. The function > opens and file and searches through the file for the supplied string. > My problem is that the function is receiving the string in upper-case, > and I'd like the case preserved. Its something like this: > /* */ > call Lookup('UPPERandLowercase') > exit > Lookup: > arg myString > /* Open file and search for myString */ > say myString > return >The output from this fragment is UPPERANDLOWERCASE. How do I preserve case? I've had stuff do this befor too, i fixed it so it CAN be done. I THINK ya need to put ANOTHER set of quote marks around the STRING. Whats happening is that one thing is strippingg off quotes, and then another sees no quotes so it uppercases automaticially. Try the test with somthing like the below note ThE SpACe ^ ^ If ya just get the NOTE back ya need to add on quotes somewhere like this. /**/ getstring foo /* Foo will have spaces /case ect in tact*/ /* But if ya call a function onto it the lack of quotes will cause the spaces to get eaten, and upercased */ foo = "'"||foo||"'" /* NOW ya can work with foo */ msg1 foo >2> What kind of modularity can I get out of Arexx? I plan to implement a > collection of Arexx scripts which are invoked by various command keys > from CEDPro. All of these scripts will be making calls to a set of > low-level primitives which I have implemented (e.g. Lookup(), above). > Do I have to copy the entire set of primitive functions into each Arexx > script file? Is there a way (aside from writing an External Function > Library) to maintain a collection of Arexx functions which can be called > from various scripts? Not sure what ya mean, ya can call an arexx script from an arexx script. I got 1 script that loads all the libraries, so it get's called by other rexx scripts all the time. >3> I'm using CEDPro's getstring function to let the user enter a string. > I'd like to pass a string for the DefaultTitle as well as an _empty_ > DefaultValue. The syntax is: getstring DefaultValue DefaultTitle. > I can't seem to successfully pass an empty string for the DefaultTitle > no matter what horrendous quoting I try. Currently I pass a string > consisting of a single space for the DefaultValue, and then strip the > space off of the return result; which is kind of lame-o. How can I > pass an empty string? Hmm tell it a variable name with a "null" character in it. Or give it a null char for thr title. >PS. When I'm done, I plan to distribute my package; in case others may > find my scripts useful. Be sure to post those Puppies! I'm allways looking for New AREXX-CED-Whatever stuff. -- yorkw@ecn.purdue.edu aka Willis F York aka Squid on IRC The only thing that Apple invented is the idea to borrow Xerox-invented ideas. (Hope THIS sig don't insult anyone!) :^)