We help IT Professionals succeed at work.

Delete function giving compiler error

M S
M S used Ask the Experts™
on
I'm trying to chop up an ansi string with the Delete function.  I'm getting a compiler error on that line.

program textProcess6;
uses sysutils;
{$H+}
var
  namein,nameout: string[255];
  raw_text,processed_text: ansistring;
  textin,textout: text;
begin
  namein := 'input_file.txt';
  nameout := 'output_file.txt';
  assign(textin,namein);
  reset(textin);
  assign(textout,nameout);
  rewrite(textout);
  while not eof(textin) do begin
    readln(textin,raw_text);
	processed_text := Delete(raw_text,1,5);
    writeln(textout,processed_text);
  end;
  close(textout);
end.

Open in new window

Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Senior Developer
Commented:
What error message? Delete() is not defined on AnsiString (free pascal).