|
Will set the length of the specified area to 0 (meaning that the area is treated as an empty area from that moment on). |
|
TargetArea |
The area, that will receive the size reset. |
|
global
procedure GetAreaFromFile(Area a_signed,string filename)
begin
Boolean testf;
LongInt pos;
string 1 c;
Integer cnt;
string 255 tstr;
SetAreaZeroSize(a_signed);
OpenFile(filename);
pos = 0;
testf = true;
while (testf) begin
c = ReadChar(pos);
tstr = tstr & c;
cnt = cnt + 1;
pos = pos + 1;
if (TestEOF) then begin testf = false; end;
if (cnt>=200) then begin
AddTextToArea(tstr,a_signed);
cnt = 0;
tstr = "";
end;
end;
AddTextToArea(tstr,a_signed);
CloseFile;
return;
end;
««