[Gambas-user] Gambas 3 RC1 CSng project conversion bug
Ron
ron at ...1740...
Mon Mar 28 09:11:09 CEST 2011
Testing RC1 with code revision 3693
Converting a project to Gambas3 doesn't work 100% correct.
It seems '+ CSingle' becomes 'CSingleSng'
If (RecBuf[6] And &H8) = 0 Then
' [GB2:CSNG] sCelsius = CSng(Hex(RecBuf[5])) +
CSng(Hex(Lsr(RecBuf[4], 4))) / 10
sCelsius = CSingle(Hex(RecBuf[5]))CSingleSng(Hex(Lsr(RecBuf[4],
4))) / 10
Else
' [GB2:CSNG] sCelsius = 0 - (CSng(Hex(RecBuf[5])) +
CSng(Hex(Lsr(RecBuf[4], 4))) / 10)
sCelsius = 0 -
(CSingle(Hex(RecBuf[5]))CSingleSng(Hex(Lsr(RecBuf[4], 4))) / 10)
End If
Here it seems a 2 step process where the Hex ()is lost:
' [GB2:CSNG] sTrain = (CSng(Hex(RecBuf[8] And &HF)) * 1000 +
CSng(Hex(RecBuf[7])) * 10 + CSng(Hex(Lsr(RecBuf[6], 4))))
' [GB2:CSNG] sTrain = (CSingle(Hex(RecBuf[8] And &HF)) *
1000CSingleSng(Hex(RecBuf[7])) *CSingle+ CSng(Hex(Lsr(RecBuf[6], 4))))
sTrain = (CSingle(Hex(RecBuf[8] And &HF)) * 1000
CSingleSng(Hex(RecBuf[7])) * CSingle + CSnCSinglex(Lsr(RecBuf[6], 4))))
Regards,
Ron_2nd.
More information about the User
mailing list