[fpc-pascal] Undocumented SetLength functionality

Sven Barth pascaldragon at googlemail.com
Fri May 18 17:17:28 CEST 2018


Michael Van Canneyt <michael at freepascal.org> schrieb am Di., 15. Mai 2018,
14:29:

>
>
> On Tue, 15 May 2018, Sven Barth via fpc-pascal wrote:
>
> > Torsten Bonde Christiansen <tc at epidata.info> schrieb am Di., 15. Mai
> 2018,
> > 12:03:
> >
> >> Is this a feature, bug or undocumented behaviour?
> >>
> >
> > This is a feature and absolutely by design.
> >
> >
> >> Afair, this was allowed back in Delphi7 (which is where i copied some of
> >> my old code from), but i'm not sure whether it was documented.
> >>
> >> At least the current RTL documentation on SetLength does not include
> >> other variants than the one with just a single length specifier.
> >> https://www.freepascal.org/docs-html/rtl/system/setlength.html
> >
> >
> > While it's not explicitly mentioned it's at least used in one f the
> > examples for dynamic arrays in the language guide:
> > https://freepascal.org/docs-html/current/ref/refse14.html#QQ2-38-57
> > Maybe this can indeed be clarified a bit.
>
> Indeed. Please enter a bugreport so I do not forget it.
>

Done: https://bugs.freepascal.org/view.php?id=33759

Regards,
Sven

>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20180518/c3375598/attachment.html>


More information about the fpc-pascal mailing list