CompuServe Thread

Forum unknown · Talk to the Trade

#ARexx Filezap?

5 messages in this thread
#128749From: Thomas HoladayJun 8, 1988 11:52 AM
It would be a thrill to be able to patch the Funkey's 'NEWCLI' generator which came with TxED Plus to summon up NewWSH instead using an ARexx program; it would sort of complete the circuit, don't you think? (though TeX and C.A.S.E are not part of it, yet, hmm …) Am I right that a Filezap program in ARexx is something on the order of /* StupidOneShot to zap Funkeys */ say open('MyInput','c:Funkys','R') say open('MyOutput','c:NewFunkeys','W') /* Suppose ARP List says Funkeys has a length of 3248 bytes */ Instring = readch('MyInput',3248) say close('MyInput') Zapspot = POS(Instring,'NEWCLI') say delstr(Instring,Zapspot,6) say insert('NewWSH',Instring,Zapspot) say writech('MyOutput',Instring) say close('MyOutput') I'm a little troubled by having quote marks around what my Pascal ad Snobol4 background impel me to think of as file variables. Shouldn't it be say open(MyInput,'c:Funkeys','R') instead?
#128771From: Bill HawesJun 8, 1988 5:39 PM
You can use either variables or literal strings as arguments for the I/O functions, but remember that arguments to a REXX function are _always_ evaluated as an expression. Thus the use of a variable for the logical file name would retrieve the value of the variable. This might be just what you wanted, but would be confusing if you expected the variable name itself. Also, keep in mind that the ARexx logical file names are case-sensitive, but file names in AmigaDOS are not. So call open(MyFile,'c:foo',r) is equivalent to call open(MYFILE,'c:foo',R) provided that MYFILE and R (as variables) haven't been assigned values. -Bill Hawes
#128931From: Perry S. Kivolowitz/ASDJun 9, 1988 9:04 PM
Bill, Any further thought on allowing us to put an AREXX demo on our next product? What about the idea of AREXX discount coupons to be included in every unit we ship? Perry
#128931From: Perry S. Kivolowitz/ASDJun 9, 1988 9:04 PM
Bill, Any further thought on allowing us to put an AREXX demo on our next product? What about the idea of AREXX discount coupons to be included in every unit we ship? Perry
#128771From: Bill HawesJun 8, 1988 5:39 PM
You can use either variables or literal strings as arguments for the I/O functions, but remember that arguments to a REXX function are _always_ evaluated as an expression. Thus the use of a variable for the logical file name would retrieve the value of the variable. This might be just what you wanted, but would be confusing if you expected the variable name itself. Also, keep in mind that the ARexx logical file names are case-sensitive, but file names in AmigaDOS are not. So call open(MyFile,'c:foo',r) is equivalent to call open(MYFILE,'c:foo',R) provided that MYFILE and R (as variables) haven't been assigned values. -Bill Hawes