Many thanks for your helpful responses thus far. My next question is, how do I read a whole text file into a memo field?
At present, my code is:
if FileExists('entries/1.jnl') then
// Display the file contents
//open the file for reading
while not Eof(myFile) do
MemoRecent.Text := text;
// Close the file for the last time
MemoRecent.Text := '1.jnl does not appear to exist';
But this obviously merely sets the memo to show the last section of the file (i.e. after the final newline). In PHP, which I am more familiar with, you can append things to strings.
i.e. $string="some text";
$string.=" some more text";
//$string now equals "some text some more text"
Is there an equivalent in Delphi?