(* Collection of code snippets by Arne Vajhøj *)
(* (from articles on eksperten.dk / vajhoej.dk written sometime between 2004 and now) *)
var
   fcsv : text;

function csv_read_str : pstr;

var
   line : pstr;
   c : char;

begin
   line := '';
   c := ' ';
   while not(eoln(fcsv)) and (c <> ',')do begin
      read(fcsv, c);
      if c <> ',' then line := line + c;
   end;
   csv_read_str := line;
end;

function csv_read_int : integer;

var
   v : integer;

begin
   readv(csv_read_str, v);
   return v;
end;

procedure csv_read_lin;

begin
   readln(fcsv);
end;

