How to Read and write a two dimensional array in pbasic?
tripjack
Posts: 13
Hi,
I'm trying to read from a table in pbasic on a BS2sx.
I loaded the following data
r0 DATA "1234", "5678"
r1 DATA "ABCD", "EFGH"
I'm noticing that the READ command only returns bytes.
so the command :
READ r1, strByte
returns 1
Can someone suggest a subroutine in pbasic that I specify the row and column of my data and it returns the whole string?·· eg: r1 c1 returns "EFGH"
Thanks,
David
·
I'm trying to read from a table in pbasic on a BS2sx.
I loaded the following data
r0 DATA "1234", "5678"
r1 DATA "ABCD", "EFGH"
I'm noticing that the READ command only returns bytes.
so the command :
READ r1, strByte
returns 1
Can someone suggest a subroutine in pbasic that I specify the row and column of my data and it returns the whole string?·· eg: r1 c1 returns "EFGH"
Thanks,
David
·
Comments
r· VAR· Nib
c· VAR· Nib
cell = r * c
READ·cell, contents
Post Edit -- You could jamb this up with bad values (r, c), but I think you get the idea.
Post Edited (PJ Allen) : 11/19/2006 2:28:29 PM GMT
I used this code and it works great!
·
·
Thanks,
David
·