Created
November 19, 2020 21:10
-
-
Save magdesign/15b219304f8a27b62efa5ec16a789a51 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* this reads out the number in a file (data.txt) and prints it */ | |
static final String FILE_NAME = "/home/magdesign/Desktop/data.txt"; | |
int[] data; | |
void setup() { | |
String[] txtFile = loadStrings(FILE_NAME); | |
data = new int[txtFile.length]; | |
for (int i = 0; i != data.length; println()) | |
println( data[i] = int((txtFile[i++])) ); | |
exit(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment