[fpc-pascal] Partially initializing array of records

2011-07-19 Thread Clay Stuart
Hello Everyone: I've got an array of records that looks something like this: type node = record foo : array[1..10] of integer; bar : array[1..10] of integer; end var graph : array[1..5] of node; begin... However, the arrays hold different amounts of

Re: [fpc-pascal] Partially initializing array of records

2011-07-19 Thread ik
You are talking about dynamic array: type node = record foo : array of integer; bar : array of integer; end var graph : array of node; SetLength(graph, 5); // Gives you 0..4 elements SetLength(graph.foo, 10); //Gives you 0..9 elements ... Ido On Tue,

Re: [fpc-pascal] Partially initializing array of records

2011-07-19 Thread Rainer Stratmann
Am Tuesday 19 July 2011 19:44:17 schrieb Clay Stuart: Hello Everyone: I've got an array of records that looks something like this: type node = record foo : array[1..10] of integer; bar : array[1..10] of integer; end var graph : array[1..5] of

Re: [fpc-pascal] Partially initializing array of records

2011-07-19 Thread Clay Stuart
How do people initialize large amounts of information in practice? Do they just read in files and convert them over dynamically? (Sorry for the potentially stupid questions. I'm just coming to Pascal.) Clay On Tue, Jul 19, 2011 at 1:54 PM, Rainer Stratmann rainerstratm...@t-online.de wrote:

Re: [fpc-pascal] Partially initializing array of records

2011-07-19 Thread Flávio Etrusco
On Tue, Jul 19, 2011 at 2:44 PM, Clay Stuart clay.stu...@gmail.com wrote: Hello Everyone: I've got an array of records that looks something like this: type       node = record             foo : array[1..10] of integer;             bar : array[1..10] of integer;       end var      graph :

Re: [fpc-pascal] Partially initializing array of records

2011-07-19 Thread Martin
On 19/07/2011 19:05, Clay Stuart wrote: How do people initialize large amounts of information in practice? Do they just read in files and convert them over dynamically? There is an example for pre-initialized variable length arrays in ide\editoroptions.pp line 550 and before.