On Sun, 23 Feb 2020 16:35:28 +0100 Bart via fpc-devel <fpc-devel@lists.freepascal.org> wrote:
> Hi, > > I'm a little confused. > > From: > https://www.freepascal.org/docs-html/ref/refsu81.html > > This page gives 2 examples. > > Function Second : Real; [Public]; > begin > Second := 1; > end; > > and > > Function Second : Real; Public name ’second’; > begin > Second := 1; > end; > > In the first, Public is in brackets, in the second it is not. > > However, this will compile also: > > Function Second : Real; [Public name ’second’]; > begin > Second := 1; > end; > > So, what is the correct syntax? The [] is the old syntax. It bites attributes, so better not use it. Mattias _______________________________________________ fpc-devel maillist - fpc-devel@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel