Announcement

Collapse
No announcement yet.

Arrays within arrays

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Arrays within arrays

    I am trying to get my head around this:
    I need to setup a 32 element array and each element in that array has 3 elements.
    How do you set that up?

  • #2
    myarray[32*3] ; array[n][i]


    so element [3][0] is myarray[3*3+0]
    element [3][2] is myarray[3*3+2]
    element [31][1] is myarray[31*3+1]

    element [n][x] is myarray[n*3+x]


    pic 16 can't do arrays that big in pbp
    its possible using linear memory access
    http://www.picbasic.co.uk/forum/atta...5&d=1508279203

    Comment


    • #3
      Richard-
      Thanks for this. I did not know this was even possible. I will write some 'fiction' and check it out.

      Comment


      • #4
        Richard, I am assuming that element [0][0] is the 1st element and its corresponding 1st element?

        Comment


        • #5
          3*0+0=0

          element[0][0]= myarray[0]

          Comment

          Working...
          X