Shop
OBEX
P1 Docs
P2 Docs
Learn
Events
2d arrays — Parallax Forums
toggle menu
Categories
Discussions
Sign In
·
Register
Sign In
·
Register
Categories
Discussions
Sign In
·
Register
×
Home
›
BASIC Stamp
2d arrays
zmasterfun
Posts:
14
2008-04-26 14:47
edited 2008-04-26 19:00
in
BASIC Stamp
How do i make 2d arrays
·
on basic stamp 2
·
i did this but compilation fails...
map VAR Word(2,2)
Comments
PJAllen
Banned
Posts:
5,065
2008-04-26 14:57
edited 2008-04-26 14:57
Examples --
trial_1
··
VAR
·
Byte(2)
trial_2
··
VAR
·
Word(2)
the bytes/words available are trial_1 (0) and trial_1 (1); trial_2(0) and trial_2 (1)
zmasterfun
Posts:
14
2008-04-26 15:17
edited 2008-04-26 15:17
I know that, but can you make a 2d array like in c++ or visual basic.
In visual basic.net declaration would look like:
dim variable(2,2) as integer
How would i do the equivelent in BASIC stamp editor?
tpw_man
Posts:
276
2008-04-26 15:51
edited 2008-04-26 15:51
You cannot make a 2D array directly. There are various solutions that you can use to 'emulate' a 2D array like the one PJ Allen posted, as well as other methods.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
I am 1010, so be surprised!
zmasterfun
Posts:
14
2008-04-26 19:00
edited 2008-04-26 19:00
ok, Thank you
Sign In
or
Register
to comment.
Comments
trial_1·· VAR· Byte(2)
trial_2·· VAR· Word(2)
the bytes/words available are trial_1 (0) and trial_1 (1); trial_2(0) and trial_2 (1)
In visual basic.net declaration would look like:
dim variable(2,2) as integer
How would i do the equivelent in BASIC stamp editor?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
I am 1010, so be surprised!