Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

[REBOL] Re: array coordinates

From: brett:codeconscious at: 9-Aug-2001 12:24

> When trying to access an array element, the syntax is pretty convoluted. > For example, I've been accessing x-y coordinates in the array like this: > > pick pick board-state y x
Looks pretty straightforward.
> I'm a neophyte with REBOL, so I don't doubt that there may be an easier
way.
> What happened to C or Pascal's easy notation? > > board-state[x][y] >> board-state/8/4
== b
>> i: 4
== 4
>> i: 8
== 8
>> j: 4
== 4
>> board-state/:i/:j
== b Brett.