[Gambas-user] Warning: Class name hidden by local declaration: key
Benoit Minisini
benoit.minisini at gambas-basic.org
Tue Aug 1 14:43:35 CEST 2023
Le 01/08/2023 à 14:28, Bruce Steers a écrit :
>
>
> Key is a class name, you can use it as a parametername but it must be in
> parentheses
>
> Action_Activate((key) As String) As
> Boolean
>
> It is better to use a different word if you also want to use Key.class
> in the function.
>
Actually it *must not* be in parenthesis. You put parenthesis to tell
the compiler that you know what you are doing by using a class name as a
parameter or variable identifier. It just removes the compiler warning.
Regards,
--
Benoît Minisini.
More information about the User
mailing list