Re: [fpc-pascal] String and dynamic array initialisation

2011-02-10 Thread Jonas Maebe
On 10 Feb 2011, at 17:04, Mark Morgan Lloyd wrote: > Presumably a string defined without an explicit length is a longstring Only in case of {$h+} (which is the default in Delphi mode, but not in other modes). > and starts empty. Yes. Jonas___ fpc

Re: [fpc-pascal] String and dynamic array initialisation

2011-02-10 Thread Mark Morgan Lloyd
Jonas Maebe wrote: On 10 Feb 2011, at 16:21, Mark Morgan Lloyd wrote: Are there any cases where a string variable will be allocated with anything other than zero length, In case it's a shortstring, the initial data could be anything. or a dynamic array will be allocated with anything other t

Re: [fpc-pascal] String and dynamic array initialisation

2011-02-10 Thread Marco van de Voort
In our previous episode, Mark Morgan Lloyd said: > Are there any cases where a string variable will be allocated with > anything other than zero length, or a dynamic array will be allocated > with anything other than zero elements? Global string variables can be initialized. var x : ansistring

Re: [fpc-pascal] String and dynamic array initialisation

2011-02-10 Thread Jonas Maebe
On 10 Feb 2011, at 16:21, Mark Morgan Lloyd wrote: Are there any cases where a string variable will be allocated with anything other than zero length, In case it's a shortstring, the initial data could be anything. or a dynamic array will be allocated with anything other than zero element

[fpc-pascal] String and dynamic array initialisation

2011-02-10 Thread Mark Morgan Lloyd
Are there any cases where a string variable will be allocated with anything other than zero length, or a dynamic array will be allocated with anything other than zero elements? -- Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers