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

Jonas Maebe jonas.maebe at elis.ugent.be
Sat Mar 31 20:34:32 CEST 2012

On 31 Mar 2012, at 12:07, cobines wrote:

> The following program compiles and correctly prints 'something'. Is it
> something supported or a bug?

It is supported. Even Turbo Pascal already supported passing a single element as an open array parameter.

> When I change it to Proc('something') it
> doesn't compile (as expected).

That's probably a bug, although constant strings are hard/special: a constant string can be an array of char, a shortstring, an ansistring, a widestring and if it's one character also a char or widechar.


More information about the fpc-pascal mailing list