Path: utzoo!utgpu!news-server.csri.toronto.edu!clyde.concordia.ca!uunet!lll-winken!sun-barr!newstop!sun!stpeter.Eng.Sun.COM!cmcmanis From: cmcmanis@stpeter.Eng.Sun.COM (Chuck McManis) Newsgroups: comp.sys.amiga Subject: Re: ARexx and mg3 questions Message-ID: <138524@sun.Eng.Sun.COM> Date: 7 Jul 90 05:40:07 GMT References: <9007061951.AA00834@human-torch.lockheed.com> Sender: news@sun.Eng.Sun.COM Organization: Sun Microsystems, Mt. View, Ca. Lines: 80 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. 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. ->2. Also, in an Arexx script file, typing ->'rexx-insert "hello"' -> works (inserts hello into the current mg buffer), but ->say 'rexx-insert "hello"' -> does not work; it merely echos 'rexx-insert "hello"' to the shell. You are asking two different things, REXX first trys to parse the first word of the command as a verb and execute it. If it cannot parse it, it passes the command on to the host environment for processing. The quote in front of the command bypasses REXX's attempt to parse it and instead feeds it straight to the rexx host (in this case mg) The line 'say foobar' is a REXX command to print the string foobar on the REXX "console" which in this case happens to be the shell. Using "say foobar" (in quotes) would cause the REXX to send a "say" command to the rexx host. ->3. From within mg, the command ->M-x rexx ^M "'rexx-insert' "hi-there"" -> hangs mg completely. (mg bug? or should I have guessed that?) -> ->4. From within mg, the command ->M-x rexx ^M 'rexx-insert "hello"' -> gives error 47, arithmetic conversion error (trying to subtract insert -> from rexx); apparently rexx-insert not get correctly quoted, so ->M-x rexx ^M ' 'rexx-insert "hello" ' ' -> does nothing. Absolutlely nothing. Then ->M-x rexx ^M ' "rexx-insert" "hello" ' -> works! Sounds like the parsing of the mg command line is something like CMD-ARG := ' REXX-COMMAND ' REXX-COMMAND := VERB ARGUMENT VERB := " " ARGUMENT := " " Which isn't a bad way to parse it. ->5. related to (4) above, what help would doing ->C-u M-x rexx ... -> provide (ctrl-u is supposed to somehow quote the args, but unfortunately -> the mg docs could be clearer. Did you try ? C-u REXX-COMMAND M-x rexx ^M ->6. finally, doing a ->M-x rexx-do-region -> on a region which includes the line ->"address 'mg'" -> gives a code 3 return error (mg port locked). I have a clue but -> would appreciate some more explanation. I'm stumped on this one. You shouldn't have to do an "address" command since when REXX starts it should be automatically attached to the mg host environment, did it work without that line? It is possible that you are already connected to the mg rexx-host and the address mg command attempts to make another connection to it which fails. (only one rexx connection allowed.) -- --Chuck McManis Sun Microsystems uucp: {anywhere}!sun!cmcmanis BIX: Internet: cmcmanis@Eng.Sun.COM These opinions are my own and no one elses, but you knew that didn't you. "I tell you this parrot is bleeding deceased!"