[Gambas-user] New Property feature request
Benoît Minisini
g4mba5 at gmail.com
Sun Oct 10 17:35:29 CEST 2021
Le 10/10/2021 à 17:32, Benoît Minisini a écrit :
> Le 10/10/2021 à 14:23, Fabien Bodard a écrit :
>> Hi Benoit,
>>
>>
>> I use a lot of short property declaration.
>>
>> like :
>>
>> Property Read {Conditions} As Conditions[] Use $aConditions[]
The last "[]" is ignored, and you should get a compiler error instead.
After USE comes an identifier, the name of the variable, nothing else.
>>
>> Is it possible to add the hability to initialise the variable on the
>> declaration line ?
>>
>> Like this :
>>
>> Property Read {Conditions} As Conditions[] Use New $aConditions[]
>>
>> or
>>
>> Property Read {Conditions} As Conditions[] Use New $aConditions[3]
>>
>> ??
>>
Not like that. The syntax would be:
Property Read {Conditions} As Conditions[] Use $aConditions = New
Conditions[]
which is not very nice, and does not save a lot of typing...
--
Benoît Minisini
More information about the User
mailing list