Page 1 of 1
/newif syntax question
Posted: Sat May 01, 2004 3:51 pm
by GeoffreyF67
Any idea why this doesn't work? I get the error "Could not find command to execute" when I run it.
Code: Select all
sub main
/declare a0 int local
/newif (${Defined[a0]} {
/ECHO @a0
}
/return
Posted: Sat May 01, 2004 3:52 pm
by Lax
because you forgot the closing parenthesis
have fun
Posted: Sat May 01, 2004 3:53 pm
by GeoffreyF67
SHIT! DOH! Been looking at that for 15 minutes and didn't see that. Thanks!
Posted: Sat May 01, 2004 10:56 pm
by Jerle69
And now that your past your closed paren you may wonder why the echo statement prints @a0 instead of it's contents... try /echo ${a0} and read about the recent MQ2datavars.
Posted: Sat May 01, 2004 11:57 pm
by GeoffreyF67
Yeah I saw that thanks!
Posted: Sun May 02, 2004 12:15 am
by gruefood
Might as well change the /newif to /if since they are same thing now anyway.
GF