procedure test(const b: array of byte) ?? On Friday, February 19, 2016, silvioprog <silviop...@gmail.com> wrote:
> Hello, > > Consider the following procedure: > > procedure test(b: TBytes); > begin > end; > > The common way to pass an array of bytes in this procedure is declaring > and initializing a TBytes variable. But in Delphi (XE) I just do: > > test([65, 66, 67]); > > However, when I try it on FPC (trunk), I get: > > "Error: Incompatible type for arg no. 1: Got "{Array Of Const/Constant > Open} Array of ShortInt", expected "TBytes"". > > Is this feature supported in FPC? If so, how to use that?! > > Thank you! > > -- > Silvio Clécio >
_______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal