Shop OBEX P1 Docs P2 Docs Learn Events
Multi-dimensional arrays — Parallax Forums

Multi-dimensional arrays

ArchiverArchiver Posts: 46,084
edited 2003-02-21 08:00 in General Discussion
Hi,

Is there a way to make multi-dimensional arrays in any BASIC
language, i.e. BASIC STAMP, PICBASIC, AVR BASIC etc. I want to
receive in image information and I want to index each pixel of data.
Is this possible?

Thanks,
Corey

Comments

  • ArchiverArchiver Posts: 46,084
    edited 2003-02-21 08:00
    Well, some basics may provide multi- or at least two-dimensional
    arrays. But there is allways a way to emulate them, eg. like:

    linewidth = 512
    pixel[noparse][[/noparse]linewidth * y + x] = value
    0 <= x < linewidth, 0 <= y < maxy

    however, if it comes to basic stamps your problem is not
    multidimensional arrays, but lack of memory

    Regards
    Adrian
Sign In or Register to comment.