Hi!
I would like to knew the reason of the uncorrect working of the statement of comparison in the following test:
if to insert the next corrections
then everything is working fine.
Ver. 1.98|1.98|1.98
I would like to knew the reason of the uncorrect working of the statement of comparison in the following test:
Graphics 800,600 SetBuffer BackBuffer() SetFont LoadFont("MS Sans Serif",20) Local intervalx#[20] Local temp0#,temp1#,temp2#,tempc%,b# x#=14.143 xmax#=15.051 h#=0.242 temp0=13.417 tempc=1 While (temp0<=xmax) temp2=temp0+h intervalx[tempc]=temp2 temp0=temp2 tempc=tempc+1 Wend b=intervalx[3] If x=b Print ""+x+"="+b Else Print ""+x+"<>"+b EndIf WaitKey() End
if to insert the next corrections
Graphics 800,600 SetBuffer BackBuffer() SetFont LoadFont("MS Sans Serif",20) Local intervalx#[20] Local temp0#,temp1#,temp2#,tempc%,b# x#=14.143 xmax#=15.051 h#=0.242 temp0=13.417 tempc=1 While (temp0<=xmax) temp2=temp0+h intervalx[tempc]=temp2 temp0=temp2 tempc=tempc+1 Wend b=intervalx[3] b=Float(Str(b)) If x=b Print ""+x+"="+b Else Print ""+x+"<>"+b EndIf WaitKey() End
then everything is working fine.
Ver. 1.98|1.98|1.98