Subj : a huge favor [MPL]
To : fang-castro
From : Black Panther
Date : Wed Oct 27 2021 06:44 pm
Hello fang-castro!
27 Oct 21 09:03, you wrote to All:
fc> would someone give me a MPL line that simply writes a line of text to
fc> a .txt file? i.e. 'fang-castro is so lazy' > welcome.txt
fc> will it need a
fc> Uses
fc> ANYTHING;
Var
fptr : File
Begin
fAssign(fptr,'welcome.txt)
fReWrite(fptr) //will recreate the file each time it's run
WriteLn(fptr,'fang-castro is so lazy')
fClose(fptr)
End
If you have an existing file you'd like to edit, you could use reset(fptr) which will just open that file. You could also use append(fptr), which would append the line to the end of the current file.
Hope this helps. :)
Black Panther
... "Hey! Like I said! Privacy!" - Ivanova
--- GoldED+/LNX 1.1.5-b20180707
* Origin: Exploring other frontiers! (21:1/186)