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[255] 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 "open arrays".

Regards,
Sven
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to