Task

(Over)write a file so that it contains a string.



The reverse of Read entire file—for when you want to update or create a file which you would read in its entirety all at once.




 
$$ MODE TUSCRIPT
content="new text that will overwrite content of myfile"
LOOP
 path2file=FULLNAME (TUSTEP,"myfile",-std-)
 status=WRITE (path2file,content)
 IF (status=="OK") EXIT
 IF (status=="CREATE") ERROR/STOP CREATE ("myfile",seq-o,-std-)
ENDLOOP
 