procedure test(const b: array of byte) ??<br><br>On Friday, February 19, 2016, silvioprog <<a href="mailto:silvioprog@gmail.com">silvioprog@gmail.com</a>> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hello,<div><br></div><div>Consider the following procedure:</div><div><br></div><div>procedure test(b: TBytes);</div><div>begin</div><div>end;</div><div><div><br></div><div>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:</div><div><br></div><div> test([65, 66, 67]);<br></div><div><br></div><div>However, when I try it on FPC (trunk), I get:</div><div><br></div><div>"Error: Incompatible type for arg no. 1: Got "{Array Of Const/Constant Open} Array of ShortInt", expected "TBytes"".<br></div><div><br></div><div>Is this feature supported in FPC? If so, how to use that?!</div><div><br></div><div>Thank you!</div><div><br></div>-- <br><div><div dir="ltr"><div>Silvio Clécio</div></div></div>
</div></div>
</blockquote>