[fpc-pascal] Initialize/Finalize with count, is it possible?

Max Vlasov max.vlasov at gmail.com
Sat Nov 20 10:31:24 CET 2010


On Sat, Nov 20, 2010 at 12:07 PM, Honza <befelemepeseveze at gmail.com> wrote:

> 2010/11/20 Max Vlasov <max.vlasov at gmail.com>:
> >         FillChar(Section^, Count*ElementSize, 0);
> >         Initialize(TNameValueRec(Section^), Count);
> >
> > Is possible for such syntax to be supported? Probably I'm one of those
> rare
> > developer using it, and maybe because of this I just have to make some
> patch
> > by myself, suggesting the result to be committed :). Please let me know
> if
> > it's possible.
>
> Why to patch the language when a for loop can do the same as above?
>
> --
>

Honza, I suppose I will go with such change, but one other thought. As you
may know, many Delphi developers impressed by Lazarus hope all their
existing sources will be fpc-compatible some time. I'm just a little sad
that I have to apply this change (sure side effect critical) to about 200
source files with this constructs I have. I'd also multiply it by 2 since
there is also the finalize section in the same files:). Anyway, not a big
deal, probably some regular expression to come up with

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


More information about the fpc-pascal mailing list