You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
The text was updated successfully, but these errors were encountered:
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.
Debugger lists immediate array dimension last
when stepping through the above code, the type of
testArray
is reported by the debugger asint[][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
anint[3][]
, EVEN IF it's an array ofint[]
pointers.Your Environment
The text was updated successfully, but these errors were encountered: