We are about to switch to a new forum software. Until then we have removed the registration on this forum.
I'd like to print the contents of an array. I found printArray(), however, it doesn't seem to work (function does not exist)? I'm using Processing 2.0.2.
Sample Code:
float[] f = { 0.3, 0.4, 0.5 };
printArray(f);
// The above code prints:
// [0] 0.3
// [1] 0.4
// [2] 0.5
https://www.processing.org/reference/printArray_.html
Thanks very much in advance.
Answers
You can just use
println(some array);
. It will do the right thing...I'm also @ v2.0.2! Function printArray() was made to replace the println()'s old behavior for arrays anyways! ;)
Ops! Sorry. I missed the version. I'm using 2.0.1....
_vk, you're not wrong ;) Thanks guys!
GoToLoop - Understood. I'm curious, though, does printArray() work for you or no?
Newest function printArray() was introduced @ v. 2.2 or so I believe.
Since I'm @ v. 2.0.2, it doesn't even exist! Function println() has the printArray()'s behavior when it comes to printing arrays out! ~:>
Same is true for "JS Mode"! it doesn't exist there either!!! [..]
Cheers!