Path: utzoo!attcan!utgpu!news-server.csri.toronto.edu!mailrus!cornell!batcomputer!riley From: riley@batcomputer.tn.cornell.edu (Daniel S. Riley) Newsgroups: comp.sys.amiga Subject: Re: ARexx and mg3 questions Message-ID: <10509@batcomputer.tn.cornell.edu> Date: 7 Jul 90 19:30:38 GMT References: <9007061951.AA00834@human-torch.lockheed.com> <138524@sun.Eng.Sun.COM> Reply-To: riley@tcgould.tn.cornell.edu (Daniel S. Riley) Organization: Cornell Theory Center, Cornell University, Ithaca NY Lines: 49 In article <9007061951.AA00834@human-torch.lockheed.com> (Monty Kosma) writes: ->1. In an Arexx script file, typing ->address 'mg' -> works fine, but typing ->address mg -> does not. and In article <138524@sun.Eng.Sun.COM> cmcmanis@stpeter.Eng.Sun.COM (Chuck McManis) writes: >address mg causes rexx to attempt to resolve the variable 'mg' which >is not what you want, using the quotes passes the string 'mg' to the >address command. You could have said : > editor="mg" > address editor >and that would do what you expect, setting the host environment to the >contents of the editor variable. Mike said essentially the same thing, but I don't think it's right. "ADDRESS" is a special case which doesn't, by default, evaulate its arguments. I believe Colinshaw discusses this in his book--it makes the language slightly irregular, but it seemed to match naive users' expectations better. So, in the ARexx manual, we find: "ADDRESS {string | symbol}. The string or symbol *taken as a literal*, specifies the new host address" (emphasis mine) In other words, "address mg" doesn't work because ARexx converts anything that isn't quoted to uppercase, not because the unset variable 'mg' evaluates to 'MG'. "address 'mg'" works because the quoted "'mg'" isn't converted to uppercase. Chuck's example won't work unless you use the "address value" form to force evaluation of the variable. You can test this easily enough, by evaulating a few simple lines like "ed='mg'; address ed; say address()" ED "ed='mg'; address value ed; say address()" mg See? It seems very uncharacteristic for both Mike and Chuck to make a mistake like this. Do you guys have a different version of ARexx, did I miss something, or are we just way out on the tails of some probability distribution today? -Dan Riley (riley@tcgould.tn.cornell.edu, cornell!batcomputer!riley) -Wilson Lab, Cornell University p.s. mg3a is great.