[fpc-pascal] source file size ?

Tony Pelton tpelton at gmail.com
Thu Jan 5 14:27:45 CET 2006


On 1/5/06, Florian Klaempfl <florian at freepascal.org> wrote:
> Tony Pelton wrote:
> > hi all,
> >
> > i wanted to ask a question, before i spend time going down a road to
> > implement it.
> >
> > are there any thoughts on having a source file that might be megabytes
> > in size that is basically just structured data implemented as source ?
>
> up to 2 GB, the important thing is the size of the resulting parsing
> pieces. I.e. very long procedures (>10k lines), statements, expressions
> call for trouble.

this is the answer that answers my question i think.

while i hadn't thought it all the way through, in fact, the picture i
had in my head was one where there would be one massive function, that
i would call when my DLL was initialized, that would create all of the
"records" of data and add them to an array or collection for use by
the application at runtime.

i might be able to break that function into several somewhat smaller
functions, and aggregate the calls to each on via one.

procedure init();
begin
do100();
do200();
do300();
.
.
.
end;

procedure do100();
begin
{ add 1-100 of the N elements here }
.
.
.
end;

procedure do200();
begin
{ add 101-200 of the N elements here }
.
.
.
end;

thanks for the thoughts ...

Tony



More information about the fpc-pascal mailing list