Code: Select all
iNoMode := IIF(m=4,2,1) * IIF( iPmtType = PAYMENT_REVERSAL, -1, 1 )
m=1
iPmtType=3
PAYMENT_REVERSAL=3
In VO iNoMode result is -1, but in X# it is 255. If I cast the factors as such:
Code: Select all
iNoMode := (INT)IIF(m=4,2,1) * (INT)IIF( iPmtType = PAYMENT_REVERSAL, -1, 1 )
Code: Select all
FUNCTION Start() AS VOID STRICT
local iMode, iCount as int
local iPmtType, iReversal as usual
iPmtType := 3
iReversal := 3
iCount := 1
iMode := iif(iCount==4,2,1) * iif(iPmtType == iReversal,-1,1)
? "iMode " + iMode:ToString()
wait
RETURN
I know it would be better if we strong type our variables. Is there is a plan to address this situation?
Thanks,
Boonnam