I want to learn how to read from files in Pascal. I read the literature, but I did not find simple actions like readln (). Explain as simple as possible. Svayal govnokod, knocks error (error 100):
program 1; var f:FILE of STRING; a:STRING; begin Assign(f,'tct.txt'); rewrite(f); read(f,a); writeln(a); readln; end.
Who can explain (if possible and how to write to the file)
Task: read the text from the .dat file and create a file with the result