Reference.FilePrint History

Hide minor edits - Show changes to markup

November 04, 2011, at 02:51 PM by Scott Fitzgerald -
Changed lines 22-26 from:

Example


to:

Returns

byte
print() will return the number of bytes written, though reading that number is optional

December 22, 2010, at 11:51 PM by David A. Mellis -
Deleted lines 8-9:

Note that the data is not physically written to the SD card until the file is closed (with a call to the close() function) or explicitly synced (with the flush() function). If the file was opened in mode FILE_APPEND, the data will be appended to the end of the file, regardless of the current cursor position set by seek().

December 22, 2010, at 07:06 PM by David A. Mellis -
Changed lines 9-10 from:

Note that the data is not physically written to the SD card until the file is closed (with a call to the close() function) or explicitly synced (with the flush() function).

to:

Note that the data is not physically written to the SD card until the file is closed (with a call to the close() function) or explicitly synced (with the flush() function). If the file was opened in mode FILE_APPEND, the data will be appended to the end of the file, regardless of the current cursor position set by seek().

November 29, 2010, at 05:54 AM by David A. Mellis -
Added lines 9-10:

Note that the data is not physically written to the SD card until the file is closed (with a call to the close() function) or explicitly synced (with the flush() function).

November 21, 2010, at 07:05 PM by David A. Mellis -
Changed lines 16-17 from:

file: an instance of the File class (returned by SD.open())

to:

file: an instance of the File class (returned by SD.open())

November 21, 2010, at 07:04 PM by David A. Mellis -
Changed lines 11-13 from:

client.print(data)
client.print(data, BASE)

to:

file.print(data)
file.print(data, BASE)

Added lines 16-17:

file: an instance of the File class (returned by SD.open())

November 21, 2010, at 07:01 PM by David A. Mellis -
Changed lines 26-28 from:
to:
November 21, 2010, at 07:00 PM by David A. Mellis -
Added lines 1-28:

SD : File class

print()

Description

Print data to the file, which must have been opened for writing. Prints numbers as a sequence of digits, each an ASCII character (e.g. the number 123 is sent as the three characters '1', '2', '3').

Syntax

client.print(data)
client.print(data, BASE)

Parameters

data: the data to print (char, byte, int, long, or string)

BASE (optional): the base in which to print numbers: BIN for binary (base 2), DEC for decimal (base 10), OCT for octal (base 8), HEX for hexadecimal (base 16).

Example


See Also

Share