This video tutorial shows how to make text files and write to text files. Remember to add sysutils to uses and close the file.
Code and Text File Download
FPProgT32.zip
TextFile.txt
Free Pascal
www.freepascal.org
Free Pascal Wiki
wiki.freepascal.org
Lazarus IDE
www.lazarus-ide.org
Lazarus Forum
forum.lazarus.freepascal.org/index.php?action=forum
Projects Using Lazarus
wiki.freepascal.org/Projects_using_Lazarus