Re: [fpc-pascal] Static Initialisation of Arrays

2010-06-29 Thread Vinzent Höfler
spir : > Sure, but this is just a matter of convention and support by a given > compiler: > typeIntegers = array of Integer; > var ints : Integers = [1,2,3]; > could work as expected by automatically sizing, allocating and > initialising. How else could work languages that have

Re: [fpc-pascal] Static Initialisation of Arrays

2010-06-29 Thread Jürgen Hestermann
spir schrieb: Sure, but this is just a matter of convention and support by a given compiler: typeIntegers = array of Integer; var ints : Integers = [1,2,3]; could work as expected by automatically sizing, allocating and initialising. How else could work languages that have an a

Re: [fpc-pascal] Static Initialisation of Arrays

2010-06-28 Thread spir
On Mon, 28 Jun 2010 18:17:47 +0200 Jürgen Hestermann wrote: > > > Paul Michell schrieb: > > I realise that 'Array Of Single' declares a dynamic array, but is there > > any equivalent syntax for static data arrays in the same way that > > strings litterals are in effect, variable length static

Re: [fpc-pascal] Static Initialisation of Arrays

2010-06-28 Thread Jürgen Hestermann
Paul Michell schrieb: I realise that 'Array Of Single' declares a dynamic array, but is there any equivalent syntax for static data arrays in the same way that strings litterals are in effect, variable length static declarations. You have to realize, that dynamic arrays are actually pointers

Re: [fpc-pascal] Static Initialisation of Arrays

2010-06-28 Thread Paul Michell
Thanks, that will save me some futile googling ;) On 28/06/2010 10:22, Jonas Maebe wrote: On 28 Jun 2010, at 11:17, Paul Michell wrote: I realise that 'Array Of Single' declares a dynamic array, but is there any equivalent syntax for static data arrays in the same way that strings litterals a

Re: [fpc-pascal] Static Initialisation of Arrays

2010-06-28 Thread Jonas Maebe
On 28 Jun 2010, at 11:17, Paul Michell wrote: I realise that 'Array Of Single' declares a dynamic array, but is there any equivalent syntax for static data arrays in the same way that strings litterals are in effect, variable length static declarations. No, there is not... Jonas __

[fpc-pascal] Static Initialisation of Arrays

2010-06-28 Thread Paul Michell
Hello All, I am working on a program that requires some simple embedded array data. I can get the following to compile: Type TCharacterAreaData = Record Code: Integer; Name: String; Geometry: Array [0..3] Of Single; End; Const Area1: TCharacterAreaData = (Code: 1;