[Gambas-user] Global arrays

Leonardo Miliani leonardo at ...1237...
Sat Jul 8 23:08:07 CEST 2006


Ron Onstenk ha scritto:
> On Saturday 08 July 2006 11:40, Leonardo Miliani wrote:
>> I have a problem I cannot solve.
>> I would like to know how I can implement a global multi-dimensional 
>> array (valid for all the project and not just for a procedure or function).
>> Gambas cannot let me declare a multidimensional array at the beginning 
>> of a class (it tells that arrays are not allowed there) and permits me 
>> only to declare a dinamic array (i.e.: byte[]).
>> But in a program that I'm writing I _need_ a global multidimensional 
>> array (name[4,256])... How I can do that?
>>
> 
> The gambas IDE uses also global arrays
> This is done in the module 'Project'.
> By making a module 'Leonardo' with the array(s) and other 
> variables _and_ a SUB Main() as start they are available in
> everey class via Leonardo.arrayname[x,y].
> In the Main() you instantiate the current start Form.
> 
> The IDE code is a good sample with many usable methods as example.
> ( see in source tree at gambas2-1.9.xx/app/src/gambas2)
> 

I've tried this but it doesn't work...
Gambas tells that arrays cannot be declared at the top of the module... 
maybe I'm wrong with something... I don't know...


-- 
Ciao.
Leo

Visita il mio sito personale: www.leonardomiliani.com
e-mail: leonardo at ...1237...




More information about the User mailing list