Joel
14th April 2007 03:03 UTC
LogicLib help
I'm trying to convert this C style code:
if ( (someVal != 0) || (someVal < VERSION) ) {
>//... give outhandle = 1
>}
elseif ( (someVal != 0 ) || (someVal == VERSION) ) {
>// ... give outhandle = 2
>}
And this gives me error
"_If" requires 4 parameter(s), passed 8!:
${IF} $R0 != 0 ${OR} $R0 < ${VERSION}
>StrCpy ${outHandle} 1
>${ELSEIF} $R0 != "" ${OR} $R0 = ${VERSION}
>StrCpy ${outHandle} 2
>${ENDIF}
Any help?
demiller9
14th April 2007 03:38 UTC
${IF} $R0 != 0
>${ORIF} $R0 < ${VERSION}
>StrCpy $outHandle 1
>${ELSEIF} $R0 != ""
>${ORIF} $R0 = ${VERSION}
>StrCpy $outHandle 2
>${ENDIF}
You might also find that you need quotes around the $R0 operands.
$outHandle should be declared with 'Var'. ${outHandle} is declared with '!define' and probably won't let you StrCpy to it.
Don
Joel
14th April 2007 16:03 UTC
Thanks for the tips, demiller9
and $outHandle is declared as Var ;)