[fpc-pascal] Re: String type compatibility
pascaldragon at googlemail.com
Wed Apr 3 16:40:30 CEST 2013
Am 03.04.2013 16:25, schrieb Xiangrong Fang:
> > It's because in Pascal you need to declare types first.
> But why array[0..10] of Integer, or string are not "types"?
> Remember that you can use "open array" in function params anyway.
They are types, but anonymous ones.
Also do not confuse open arrays with dynamic arrays. Open arrays can
only be used for function/procedure parameters and you can pass dynamic
arrays, static arrays or array constructors ( e.g. [10, 2, 4]), but you
can only pass dynamic arrays to dynamic array parameters (which can only
be done if you use a declared dynamic array type). Also you can't return
More information about the fpc-pascal