We are about to switch to a new forum software. Until then we have removed the registration on this forum.
hii,
Greetings,
i am beginner for processing , i stuck in between please help me out,
what i want to do *open a file(xyz.txt) read data from it *do some activity(addition,mltiplication...etc) by that data upgrade it *and store in samefile(xyz.txt)
thank you
:)gani
Answers
STOP SHOUTING we can read lower case...
don't do this. read the first file, write to a second file and then rename the second file to the first file.
oops:( sorry can u help me with a example?
what do you already have?
To read a data from txt file
i am using this code
to write data in txt file
i am using this code
you don't need a createReader if you use loadStrings() - loadStrings load all the file in one go, createReader is designed for reading a line at a time - two different things. decide which you want.
https://processing.org/reference/createReader_.html
https://processing.org/reference/loadStrings_.html