Re: How can I work with a user type array in Euphoria ???
- Posted by Norman Blais <blais at HOUSTON.GECO-PRAKLA.SLB.COM> Mar 13, 1997
- 1133 views
Ricardo Niederberger Cabral wrote: > ------- > > I'm new in Euphoria and I have a doubt: > > I did a game in Visual Basic 4.0 that has a global array defined at > this way: > > Type MyType > Cell as single > Item as single > End Type > > Global MapVar(1 to 100,1 to 100) as MyType > > Then, I use this variable to store the map data, for example, if I > want to say that in 2 (vertical cordinate) ,3 (horizontal cordinate) there > is a Cell number 3 and an item number 4, I write: > MapVar(2,3).Cell=3 > MapVar(2,3).Item=4 > > So this is my problem: How can I make the same thing in Euphoria > using that sequences method ? > > I would appreciate any help. > > Thanks, > --- > Ricardo Niederberger Cabral Hi, One way could be: constant cell = 1 constant item = 2 sequence mapvar mapvar = repeat(repeat({0,0},100),100) mapvar[2][3][cell] = 3 mapvar[2][3][item] = 4 Regards, Norm