What does 'returns an instance' mean ?
hi,
i'm working way through book on arduino programming , i'm kind of stuck @ bit if loops. the code writing data sd card, , there line earlier on says 'file file;'. i'm guessing command 'file' function of sd.h library ? but command ? the book skims on it.
later on, there if loop starts with;
what don't line " if (file) { ".
if file what ? i know means "if file (is true)" - isn't ! i'm used seeing "if (a == 5)".
i have feeling confusion rooted in phrase 'returns / creates instance' , i'm testing 'if (file)' statement.... i'm not sure !
any pointers appreciated !
thanks !
i'm working way through book on arduino programming , i'm kind of stuck @ bit if loops. the code writing data sd card, , there line earlier on says 'file file;'. i'm guessing command 'file' function of sd.h library ? but command ? the book skims on it.
later on, there if loop starts with;
code: [select]
file = sd.open("data.txt", file_write);
if (file) {
while (millis() < (runningtime * msmin)) {
byte value = map(analogread(sensor), sensormin, sensormax, 0, 255);
file.write(value);
delay(interval);
}
what don't line " if (file) { ".
if file what ? i know means "if file (is true)" - isn't ! i'm used seeing "if (a == 5)".
i have feeling confusion rooted in phrase 'returns / creates instance' , i'm testing 'if (file)' statement.... i'm not sure !
any pointers appreciated !
thanks !
Arduino Forum > Using Arduino > Programming Questions > What does 'returns an instance' mean ?
arduino
Comments
Post a Comment