groog
2010-10-20 22:40:33
How can I read from a file line by line and add it to a string array. I've got something that looks like this-
but I get this error:
which would be this line
But this isn't just a "what's wrong with this code" question. Is this the right way to do it? How should I do it?
x, y, i, k: integer;
fileNum, fileSize: integer;
fileString: String;
urlsArray: Array of String;
procedure GetUrls;
begin
fileNum := OpenFile('url.txt', true);
fileSize := FileSize(fileNum);
ReadFileString(fileNum, fileString, fileSize);
end; but I get this error:
[Error] (12:23): Type mismatch at line 11
Compiling failed.
which would be this line
fileSize := FileSize(fileNum);But this isn't just a "what's wrong with this code" question. Is this the right way to do it? How should I do it?