Path: utzoo!attcan!uunet!ubvax!ardent!rap From: rap@ardent.UUCP (Rob Peck) Newsgroups: comp.sys.amiga Subject: Re: "No K directive" in 1.3's Execute (and another possible bug?) Summary: found it yesterday also... Message-ID: <1554@ardent.UUCP> Date: 10 Jan 89 19:10:20 GMT References: <1989Jan6.183818.19500@ziebmef.uucp> <10291@well.UUCP> Organization: Dana Computer, Inc., Sunnyvale, CA Lines: 48 In article <10291@well.UUCP>, sirius@well.UUCP (Mike Stilson) writes: > In article <1989Jan6.183818.19500@ziebmef.uucp> jason@ziebmef.uucp (Jason Gould) writes: > >Execute command. Whenever I try to Execute a script in the middle of a > >script currently being executed, I always get an error message that says > >"EXECUTE: No K directive" and the script fails. > > I believe this error comes about when you send an argument to the script > file that it wasn't expecting. I got that same error, and for a workaround > I put '.key fubar' as the first line in the second script file. Don't > know what it is passing, however, when I did 'echo ' it didn't print > anything out (that I could see, anyhow). I encountered this myself yesterday. It seems to be related to the use of the bracket characters in the second file. If there are any brackets used in that second file, then EXECUTE seems to want to have been warned that there was a possibility of parameter substitution. When it encounters a string that includes "", it seems to use that message to say "Hey, you didnt tell me I was expected to substitute anything!!!". The workaround suggested works fine (for me too). Null parameter passing results in null-string substitution and avoids the error. What ->I<- discovered besides this yesterday is that environment variables don't get expanded inside the quotes of an ECHO command: 1> SETENV item some-string 1> ED ram:test ECHO "Gonna print the value of item:" GETENV item ECHO "Now from inside the string, item is: $item" ECHO "Now checking normal use of environ var." IF "some-string" EQ $item ECHO "Value of item is: some-string" ELSE ECHO "Value of item not as expected" ENDIF 1> EXECUTE ram:test Gonna print the value of item: some-string Now from inside the string, item is: $item Now checking normal use of environ var. Value of item is: some-string Unfortunately, I have NOT checked whether IF "some-string" EQ "$item" works or not. HMMMMM. Rob Peck