i am opening a text file using r+ the purpose is to read a float value into the program, do the calculation then write the modified value back into the file ready to be read again the next time it is needed, but when the program is writing the modified value back it is just writing it on the end of the original value instead replacing it. any ideas on how i can get the program to replace the original float value so that the file only ever consists of one float value. it may seem simple to someone out there but help i am a neewbie.