|
Author |
Topic: small syntax error in loadBytes() (Read 360 times) |
|
guillermo
|
small syntax error in loadBytes()
« on: Oct 20th, 2003, 5:59am » |
|
The loadBytes() entry under reference has a small typo that creates an error. the "=" sign in the 7th line (counting blanks) should be "==" correct code: // open a file and read its binary data byte b[] = loadBytes("something.dat"); // print each value, from 0 to 255 for (int i = 0; i < b.length; i++) { // every tenth number, start a new line if ((i % 10) == 0) { println(); } // bytes are from -128 to 127, this converts to 0 to 255 int a = b[i] & 0xff; print(a + " "); } // print a blank line at the end println();
|
|
|
|
REAS
|
Re: small syntax error in loadBytes()
« Reply #1 on: Oct 30th, 2003, 8:41pm » |
|
thanks for the heads up. it's fixed in the master document and should be online soon. + casey
|
|
|
|
|