[fpc-pascal]Two simple dynamic arrays questions

Alan Mead cubrewer at yahoo.com
Wed Jul 28 19:48:36 CEST 2004

Hi, I am new to dynamic/open arrays.  I've installed 1.9.4 and played
with the example code, read the docs, and converted a sample program
that I'd written using static arrays to dynamic.  I have two residual

(1) Previously, I had fillchar'd the static arrays with zeros because
they are sparse-ish.  Looks like dynamic arrays are automagically
filled with zeros.  Is this true/permanent?  Or a lucky coincidence
that I shouldn't count upon?  If the later, is there a fast one-liner
like fillchar that I can use to initalize array to zeros?

(2) There is no way, I supposed, to switch the array indexes to start
at 1 is there?  I ask not from intrasigence but because I am using
matricies and it rains on my elegance parade to have to perform the
trivial translation each time I want to access an element using
absolute row/column addresses.  I also have a lot of older code and
I'll have to hunt through it and make this change everywhere...



More information about the fpc-pascal mailing list