[Gambas-user] Little editor "feature" in Gambas2

Rolf-Werner Eilert eilert-sprachen at ...221...
Mon Jan 17 08:18:19 CET 2011


Am 16.01.2011 17:39, schrieb Benoît Minisini:
>> Am 11.01.2011 18:42, schrieb Benoît Minisini:
>>>> Moin,
>>>>
>>>> Just found this one, don't know if it's been removed in Gambas3. When I
>>>> define several arrays of strings on one line within a SUB, later the
>>>> names are recognized. Example:
>>>>
>>>> DIM sMyStrings1, sMyStrings2 AS NEW String[]
>>>>
>>>> Then type
>>>>
>>>> sMyStrings1.
>>>>
>>>> and the list with "Add, Bounds, Clear..." will appear.
>>>>
>>>> However, if I define the arrays outside the SUBs for public use, they
>>>> will be recognized only if defined solely one by one on a separate line
>>>> each, i. e.
>>>>
>>>> PUBLIC sMyStrings1, sMyStrings2 AS NEW String[]
>>>>
>>>> then within a SUB type
>>>>
>>>> sMyStrings1.
>>>>
>>>> and nothing happens, but if I do
>>>>
>>>> PUBLIC sMyStrings1 AS NEW String[]
>>>> PUBLIC sMyStrings2 AS NEW String[]
>>>>
>>>> they are recognized.
>>>>
>>>> Or am I doing something false here the interpreter will understand
>>>> wrong?
>>>>
>>>> Regards
>>>>
>>>> Rolf
>>>
>>> I'm afraid it was never implemented, both in Gambas 2 and Gambas 3!
>>
>> Ok :-) At least, it's not my mistake...
>>
>
> Sorry, I told rubbish.
>
> Declaring several variables on the same line is only allowed with the DIM
> statement. Each public or private global variable must be alone on its line.
>
> If you try to compile "PUBLIC sMyStrings1, sMyStrings2 AS NEW String[]", you
> will get an error.
>
> Regards,
>
>
>

Ah ok, that's the difference, I see.

But DIM isn't allowed for module level, is it?

Have a nice week :-)

Regards

Rolf




More information about the User mailing list