Results 1 to 3 of 3

Thread: 3d arrays?

  1. #1
    Member JosephE's Avatar
    Join Date
    Jul 2010
    Age
    32
    Posts
    85
    Rep Power
    23

    3d arrays?

    Does thin debug not support viewing of 3D arrays? I could really use that right now... :/

    Otherwise, thinDEBUG is the best debugger I've ever used.

  2. #2
    thinBasic MVPs
    Join Date
    May 2007
    Location
    UK
    Posts
    1,427
    Rep Power
    160

    Re: 3d arrays?

    3d arrays are not supported at the moment but you can do a simple trick to get around this or you could change your data type to a UDT which is supported.

    %Index = 5
    
    Type tXYZ
    X As Single
    Y As Single
    Z As Single
    End Type
    
    
    Dim A(%Index,%Index,%Index) As Single
    Dim B(%Index*%Index*%Index) As Single At VarPtr(A(1,1,1))  ' this overlays array B on top of A
    Dim C(%Index*%Index*%Index) As tXYZ
    ' The following will cause thinDebug to crash if you inspect the udt contents.
    '
    'Dim C(%Index*%Index*%Index) As tXYZ  At VarPtr(A(1,1,1)) 
    
     A(1,1,1) = 1
     A(1,2,1) = 1
     A(1,1,3) = 1
     B( 2)  = 2
     B( 7)  = 7
     B(28)  = 28
     C( 3).X = 3
     C( 8).Y = 8
     C(29).Z = 29
    
    Home Desktop : Windows 7 - Intel Pentium (D) - 3.0 Ghz - 2GB - Geforce 6800GS
    Home Laptop : WinXP Pro SP3 - Intel Centrino Duo - 1.73 Ghz - 2 GB - Intel GMA 950
    Home Laptop : Windows 10 - Intel(R) Core(TM) i5-4210U CPU @ 1.70GHz, 2401 Mhz, 2 Core(s), 4 Logical Processor(s) - 4 GB - Intel HD 4400
    Work Desktop : Windows 10 - Intel I7 - 4 Ghz - 8GB - Quadro Fx 370

  3. #3
    Member JosephE's Avatar
    Join Date
    Jul 2010
    Age
    32
    Posts
    85
    Rep Power
    23

    Re: 3d arrays?

    Thanks mike, I've managed to sort things out with my array.

Similar Threads

  1. Arrays
    By Charles Pegge in forum O2h Compiler
    Replies: 0
    Last Post: 17-03-2009, 16:09

Members who have read this thread: 0

There are no members to list at the moment.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •