| Name | print() |
||||
|---|---|---|---|---|---|
| Examples |
def setup():
# Create a file in the sketch directory
global output
output = createWriter("positions.txt")
def draw():
point(mouseX, mouseY)
output.print(mouseX + "\t")# Write the X coordinate to the file
output.print(mouseY)# Write the Y coordinate to the file
def keyPressed():
output.flush()# Writes the remaining data to the file
output.close()# Finishes the file
exit()# Stops the program
| ||||
| Description | |||||
| Syntax |
| ||||
| Parameters |
|
Cover
Reference
Tutorials
Examples
Bugs
