[Gambas-user] Const

Gaël Le Hec'H gael.lehech at gmail.com
Fri Feb 23 13:07:27 CET 2024


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


Le ven. 23 févr. 2024 à 11:07, Gianluigi <gradobag at gradobag.it> a écrit :
>
> Il 23/02/24 10:54, Philippe Valarcher ha scritto:
>
> I only mean this :
> In an old program before 3.19 I did  :
>
> Public Const C As Float = 344
> Public Const PO As Float = 1.1803398875
>
> In 3.19 when I compile those const. do not use the values in calculations.
> I had to to convert in :
>
> Public  C As Float = 344
> Public  PO As Float = 1.1803398875
>
> For the calculations to be done the way it should.
>
> --
>
> Philippe Valarcher <philippe.valarcher at free.fr>
>
>
> here this works:
>
> Public C As Float = 344
> Public PO As Float = 1.1803398875
>
> Public Sub Main()
>
>   Print c * po
>   Print c / po
>
> End
>
> Regards
> Gianluigi
>
>
> ----[ http://gambaswiki.org/wiki/doc/netiquette ]----


More information about the User mailing list