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

[REBOL] array coordinates

From: cyoungbl::legato::com at: 8-Aug-2001 15:11

I've created a simple array block like this: board-state: [ [ r r r r ] [ r r k r ] [ r r r r ] [ 0 0 0 0 ] [ 0 0 0 0 ] [ b b b b ] [ b j b b ] [ b b b b ] ] 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 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] Thanks, Carl