Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Debugger lists immediate array dimension last #606

Closed
jcmckeown opened this issue Nov 25, 2022 · 0 comments · Fixed by #729
Closed

Debugger lists immediate array dimension last #606

jcmckeown opened this issue Nov 25, 2022 · 0 comments · Fixed by #729
Labels
Help Wanted We have very little time and would like some help

Comments

@jcmckeown
Copy link

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
@benfry benfry added the Help Wanted We have very little time and would like some help label Jan 16, 2023
WillRabalais04 added a commit to WillRabalais04/processing4 that referenced this issue Mar 24, 2023
Updates the getStringValue method of the VariableNode class so that it correctly handles multidimensional arrays. The default formatting of multidimensional arrays is to have the size of the first array written in the last set of brackets eg.int[][5]. This changes it so that the returned value has the size of the first array written in the first set of brackets eg.int[5][]. This can parse multidimensional arrays of any size.
sampottinger added a commit that referenced this issue May 9, 2023
sampottinger added a commit that referenced this issue May 9, 2023
Closes Debugger lists immediate array dimension last #606.
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 13, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Help Wanted We have very little time and would like some help
Projects
None yet
2 participants