RosettaCodeData/Task/Write-entire-file/TUSCRIPT/write-entire-file.tu
2023-07-01 13:44:08 -04:00

8 lines
253 B
Turing

$$ 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