> On Dec 10, 2019, at 5:14 PM, Sven Barth via fpc-devel > <fpc-devel@lists.freepascal.org> wrote: > > From the view of the *caller* you are mostly right. Though the square > brackets can't be left away, cause we're talking about an array parameter > here. If it would be allowed for array of const then it would also need to be > allowed for other open array parameters for consistency. But then it wouldn't > be consistent with open array arguments in the middle. Each exception makes > the language more complex. >
Yeah it's an array but it's also slightly annoying when the meaning is basically what we know as "varargs", i.e. an unspecified amount of extra parameters. This common pattern in Format() is a good example of a last parameter array of const which doesn't really gain anything by adding the extra [] every time. I smell another mode switch. :) Format('%dx%d',[100,100]); Regards, Ryan Joseph _______________________________________________ fpc-devel maillist - fpc-devel@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel