[fpc-pascal] Partially initializing array of records
flavio.etrusco at gmail.com
Tue Jul 19 20:07:01 CEST 2011
On Tue, Jul 19, 2011 at 2:44 PM, Clay Stuart <clay.stuart at gmail.com> wrote:
> Hello Everyone:
> I've got an array of records that looks something like this:
> node = record
> foo : array[1..10] of integer;
> bar : array[1..10] of integer;
> graph : array[1..5] of node;
> However, the arrays hold different amounts of numbers. So node.foo might
> hold 5 numbers while node.foo might hold only 2.
> My Question...
> Is there a way to initialize these numbers somehow. It seems the compiler
> won't allow me to partly fill the arrays. If I use them, it appears I have
> to use them all the way.
> Thank you in advance,
AFAIK no. You'll have to explicitly initialize them with '0'.
More information about the fpc-pascal