Today I am facing very strange issue on the multiply function. It is NOT working properly for some numbers as given below examples.
1. 597.67 * 100 = Not Working shows **********
2. 597.67 * 1000 = Working
Could you please help me on this its very strange and weird experience for me. I would request to you all to help to me on this.
- Code: Select all Expand view RUN
#include "Fivewin.ch"
function main
local oDlg
local oFont
local nRate := 597.67
local nQTy := 100
local nAmt := ( nRate * nQTy )
local aoGET := Array(5)
DEFINE FONT oFont NAME "TAHOMA" SIZE 0,-14
DEFINE DIALOG oDlg SIZE 900,700 PIXEL TRUEPIXEL FONT oFont
@100,20 SAY "Rate" PIXEL
@100,70 GET aoGET[ 1 ] VAR nRate PICTURE "@Z 99,99,99,999.99" SIZE 100 , 20 OF oDlg PIXEL
aoGET[ 1 ]:bValid := < ||
nAmt := ( nRate * nQTy )
oDlg:Update()
return .t.
>
@100,180 SAY "Qty" PIXEL
@100,230 GET aoGET[ 2 ] VAR nQTy PICTURE "@Z 99,99,99,999" SIZE 100 , 20 OF oDlg PIXEL
aoGET[ 2 ]:bValid := < ||
nAmt := ( nRate * nQTy )
oDlg:Update()
return .t.
>
@100,360 SAY "Amount" PIXEL
@100,450 GET aoGET[ 3 ] VAR nAmt PICTURE "@Z 99,99,99,99,999.99" SIZE 200 , 20 OF oDlg PIXEL UPDATE
ACTIVATE DIALOG oDlg
return nil