[fpc-pascal] Passing a string to open array of string

cobines cobines at gmail.com
Sat Mar 31 12:07:55 CEST 2012


Hello.

The following program compiles and correctly prints 'something'. Is it
something supported or a bug? When I change it to Proc('something') it
doesn't compile (as expected).

program Project1;
{$mode objfpc}{$H+}

procedure Proc(const s: array of string);
begin
  WriteLn(s[0]);
end;

var
  s: string = 'something';
begin
  Proc(s);
end.

--
cobines



More information about the fpc-pascal mailing list