yorkw@stable.ecn.purdue.edu (Willis F York) (09/02/90)
{} Well I am having a problem (Posibially a BUG!) with CED& AREXX Her is the little program. (or at least a Part of it) i do X = 0 to 5 /* Do it five Times*/ getstring '" "' question.X /* CED comand to get a String Requestor*/ if (result= "") | (result="RESULT") then result= "Ya Made A Boo Bo!" /* Above line checks to see that somthing got entered! */ answer = result /* (A temp var I was using to Try to fix the Problem */ okay1 answer /* Will Show what ya typed, a De-Bug step*/ replace rvar.X answer /* MAin Problem Seems to be with this function*/ /* rvar.X is a <NAME> string in the TEXT file */ /* I am geting a response to somthing like Your Name? I put in Joe Smith. The Text string <NAME> is to then get replaced by "Joe Smith" */ end Ok I run this from ced, (with an OPTOPNS RESULTS ect.) the think will work fine as long as i don't have any spaces in the requestor field. If i put in 2+ words only the first one is used ie. The othere get lost somewhere. e. i put "JOE SMITH" and the string <NAME> gets replaced by JOE speces DO work from CED manually, I just can't get this to work. from REXX...... seems the result has the whole name w/ spaces but the replace foo yoo line loses the following words. I've tried all kinds of quoating but nothing seems to work. (hmmmm. i wponder is a direct replace <name> "JOE SMITH" would work.... If i got just JOE i'd know that there is NO way to fix this problem.... well HELP!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Thanx. -- |\/\/\/| / yorkw@stable.ecn.purdue.edu -------------------------\ | | | Willis F York Better Known as the Pacificist AGNE | | (o)(o) | Full Time Student | C _) | Agricultural Engineering, Purdue University |
yorkw@stable.ecn.purdue.edu (Willis F York) (09/02/90)
{} {} Well I got it to work Here's what i DID. getstring '" "' question.X if (result= "") | (result="RESULT") then result= "'Ya Made A Boo Bo!'" answer = '"'||result||'"' /* This is the Main Diff!!! */ okay1 answer replace rvar.X answer Aparently the replace needs a set of " " around the string it gets sent. but it seems to strip off too many sets of " " (posibially AREXX strips off 1 set then CED does it again.??? (Or it's just a Programming ERROR!) Thus i add an extra set of " " to the ends of the string inside the var. answer. thus 'Joe Smith' becomes "'joe Smith'" i don't think this is ever needed to BE done in AREXX . thus i can't see why it NEEDS to be done here., (Thus a Bug??) so the replace strips off a set of "" and still has a set to work with. the second set DOES NOT appear in the replaces text. ie. they also get striped off and the Text+spaces gets put where it belongs. I am using Version 2 CED pro. Thus this BETTER be FIXED in the NEXT VERSION!!! well Keep on REXX'ing C thus i add an extra set of " " to the (results) -- |\/\/\/| / yorkw@stable.ecn.purdue.edu -------------------------\ | | | Willis F York Better Known as the Pacificist AGNE | | (o)(o) | Full Time Student | C _) | Agricultural Engineering, Purdue University |
perry@madnix.UUCP (Perry Kivolowitz) (09/07/90)
Getting strings from CED using GETSTRING works fine even when there are spaces in the arguments or the string. Remember that: (1) AREXX ALWAYS strips the outer most set of quotes off of everything. (2) CED strips a set of quotes which tells it that everything inbetween is a single argument. So... GETSTRING "This is a test." doesn't work. but... GETSTRING '"This is a test."' does the expected thing. pk -- Perry Kivolowitz, ASDG Inc. ``We look for things. Things that make us go.'' UUCP: {harvard|rutgers|ucbvax}!uwvax!astroatc!nicmad!madnix!perry CIS: 76004,1765 PLINK: pk-asdg