We are about to switch to a new forum software. Until then we have removed the registration on this forum.
I want to add a value to array which is controled by the keyboard. Like this:
char[] a=new string[100]; char value=""; void draw(){ } void keyPressed(){ value=key; }
I want that the value will be added to the array and when it changes the new value will be added to next index. how to do this?
Answers
https://Processing.org/reference/IntList.html
Ho... I need with strings.. :(
https://Processing.org/reference/StringList.html
thank you GoToLoop!
ok I have one more question. how can I connect all the elements of the string list to one big string? for example: I have StringList of: "r", "a","z". I want that it will be connect to string like: String a=index 0 of the list+lndex 1 of the list... and it will be created a big word (in this ex. "raz"). how can I do this?
No matter whether it's StringList or even IntList, we can call method array():
https://Processing.org/reference/IntList_array_.html
For IntList:
http://docs.Oracle.com/javase/8/docs/api/java/lang/String.html#String-int:A-int-int-
For StringList:
https://Processing.org/reference/join_.html