Eduard
2012-12-12 15:14:40
Hi guys,
just refreshing up my PASCAL/SIMBA a little bit.
Just wondering, what's wrong with this code?
[Error] (12:36): Internal error (20) at line 11
Compiling failed.
just refreshing up my PASCAL/SIMBA a little bit.
Just wondering, what's wrong with this code?
program IOtest;
var
iCreateFile,iAppendFile:integer;
bString:Boolean;
const
sFilePath = 'C:\CurrentStatusBot.txt';
sStringToWrite = 'Bot is up!';
begin
iCreateFile = CreateFile(sFilePath); //create handle for closing file();
if (iCreateFile <> -1) then // if no error then proceed.
begin
CloseFile(iCreateFile); // close created file.
iAppendFile = Appendfile(sFilePath); // create handle for appending file.
if (iAppendFile <> -1) then // if no error then proceed.
begin
bString = WriteFileString(iAppendFile,sStringToWrite); // error checking variable.
if(bString <> false) then // if writefilestring was succesfull then
begin
writeln('Everything went succesfully!'); // writeln();
CloseFile(iAppendFile);
end
end
end
end.[Error] (12:36): Internal error (20) at line 11
Compiling failed.