Archive: LogicLib help


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?

${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

Thanks for the tips, demiller9

and $outHandle is declared as Var ;)