This is something I've come up with for strings using String.Arg, but is there an easier or better way?
Code: Select all
/declare string global
/varset string "This is a string"
/newif ${Bool[${String[@string].Arg[3]}]} {
/echo true
} else /echo false
/newif ${Bool[${String[@string].Arg[6]}]} {
/echo true
} else /echo false
I really dont know what to do about going through an array. this is what I have so far, but its never returning false.
Code: Select all
/declare array1 array
/declare array_count global
/varset array1(0) test
/varset array1(1) test
/varset array1(2) test
/varset array_count 0
:checkarray
/newif ${Bool[@array1(@array_count)]} {
/echo @array_count - true - @array1(@array_count)
} else {
/echo @array_count - false - @array1(@array_count)
/return
}
/varadd array_count 1
/goto :checkarray
/newif ${String[@array1(@array_count)].NotEqual["UNDEFINED-ARRAY-ELEMENT"]}
as my if statement, and it works, but is there a better way?
(btw, using 4/8/04 build with mq2parms and mq2data enabled)

