[fpc-pascal] open arrays as parameters (why packed not allowed)?

Bruce Bauman bruce.bauman at andesaservices.com
Thu Oct 15 14:49:38 CEST 2009


I am translating some Pascal code from MetaWare Professional Pascal to
Free Pascal.

The MetaWare code uses conformant arrays, which are not supported within
Free Pascal. We are thus translating these to use Free Pascal open
arrays.

However, Free Pascal does not allow the "packed" qualifier on the array
parameter.

For example,

procedure PackStr         // Convert string to packed array
   (    InStr:      StdStrLong;
    var OutArr:     packed array of char);

is not allowed, while

procedure PackStr         // Convert string to packed array

   (    InStr:      StdStrLong;

    var OutArr:     array of char);


is accepted by the compiler.

Is there a reason why "packed" is not allowed in this context?

Thanks.

-- Bruce







CONFIDENTIALITY NOTICE: This e-mail is confidential and intended
solely for the use of the individual or entity to which it is addressed.  If
you are not the intended recipient, be advised that you have received 
this email in error and that any use, dissemination, forwarding, printing 
or copying of this e-mail is strictly prohibited. If you received this e-mail
in error, please delete it from your computer and contact the sender.




More information about the fpc-pascal mailing list