Description
This function will print text of character strings and numbers.
ie. char, int, double, float, long
Syntax
Parameters
x – The x-coordinate of the text
y – The y-coordinate of the text
Returns
none
Example
/////////////////////////////////////////
//setup
/////////////////////////////////////////
void setup()
{
background(0,0,0);
stroke(255,255,255);
fill(0,0,0);
}
/////////////////////////////////////////
//loop
/////////////////////////////////////////
void loop()
{
text((int)321,5,5); //print the integer 321 at pixel location 5,5
text((double)122.345,50,50); //print the double 122.345 at pixel location 50,50
text((long)7654321,100,100); //print the long 7654321 at pixel location 100,100
text((float)4321.456,150,150); //print the float 4321.456 at pixel location 150,150
text(“no pony!”,200,200); //print the character string “no pony!” at pixel location 200,200
}