print()

Output / Text Area

Description

Writes to the console. Does not add a newline. Accepts any type.

Syntax

void print(T v)

Parameters

NameTypeDescription
vanythe value to print

Returns

void

Related

Under the Hood

From Processing.h:

template<typename T> inline void print(const T& v) { std::cout << v; std::cout.flush(); } void print() const { for (int i = 0; i < (int)data.size(); i++) printf("[%d] %d\n", i, data[i]); } void print() const { for (int i = 0; i < (int)data.size(); i++) printf("[%d] %s\n", i, data[i].c_str()); } template<typename T> void print(const T& v) { f << v; } template<typename T> static void print(const T& v) { std::cout << v; std::cout.flush(); }