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

------------------------------------------------------------------------------
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand 
malware threats, the impact they can have on your business, and how you 
can protect your company and customers by using code signing.
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user

Reply via email to