Skip to content

Debugger lists immediate array dimension last #606

Closed
@processing-bot

Description

@processing-bot

Created by: jcmckeown

void setup(){
  int [][] testArray = new int[3][4];
  println(testArray.length); // set a breakpoint here, if you like
  println(testArray[0].length);
}

Debugger lists immediate array dimension last

when stepping through the above code, the type of testArray is reported by the debugger as int[][3], which is easily understood, but a bit confusing.

Expected Behavior

Since this seems to be the java way of declaring arrays-of-arrays, it would seem more consistent to keep the declared order of dimensions, and call testArray an int[3][], EVEN IF it's an array of int[] pointers.

Your Environment

  • Processing version: 3.4 and 4.0.1
  • Operating System and OS version: Linux xyzxyz 6.0.8-arch1-1 ♯1 SMP PREEMPT_DYNAMIC Thu, 10 Nov 2022 21:14:24 +0000 x86_64 GNU/Linux

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions