[Gambas-user] Const

T Lee Davidson t.lee.davidson at gmail.com
Fri Feb 23 14:47:00 CET 2024


On 2/23/24 07:07, Gaël Le Hec'H wrote:
> Got this here with 3.19.0 :
> C = 344
> D = 88
> 
> with this code :
> Public Const C As Float = 344.0
> Public Const D As Float = 344
> 
> Public Sub Main()
>    Print "C = " & C
>    Print "D = " & D
> End
> 

Well now that seems a bit strange.

This:
[code]
Public Sub Main()

   Print "C in decimal = "; C, "in Binary = "; Bin(C, 10)
   Print "D in decimal = "; D, "in binary = "; Bin(D, 10)

End
[/code]

yields this:
C in decimal = 344      in Binary = 0101011000
D in decimal = 88       in binary = 0001011000


-- 
Lee



More information about the User mailing list