<table cellspacing="0" cellpadding="0" border="0" ><tr><td valign="top" style="font: inherit;">Congratulation, so this case was closed<br><br>=============INTOSOFT============<br>
           ALEXIO CHAOS<br>
   Darmawan_Sugiarto@yahoo.com   <br>
          Yahoo Messager<br>
=================================<br><br>--- On <b>Mon, 1/19/09, Dave Coventry <i><dgcoventry@gmail.com></i></b> wrote:<br><blockquote style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;"><br>From: Dave Coventry <dgcoventry@gmail.com><br>Subject: Re: [Lazarus] Passing an array to a function<br>To: "General mailing list" <lazarus@lazarus.freepascal.org><br>Date: Monday, January 19, 2009, 9:34 PM<br><br><div class="plainMail">2009/1/20 Darmawan Sugiarto <<a ymailto="mailto:darmawan_sugiarto@yahoo.com" href="/mc/compose?to=darmawan_sugiarto@yahoo.com">darmawan_sugiarto@yahoo.com</a>>:<br>> Can you give more information about your function.<br><br>Sure:<br><br><br>function FieldValueAsString(var fsbuffer: TByteBuffer;<br>fitype,marker,fisize: integer): string;<br>begin<br>  case fitype of<br>43,52,108:Result:=inttostr(LEtoN(PLongint(@fsbuffer[marker])^));<br>
 50:Result:=inttostr(LEtoN(PSmallInt(@fsbuffer[marker])^));<br>end;<br>end;<br><br>It was failing before it got there, so I don't think the problem was<br>with the function.<br><br>In any case, Martin's suggestion regarding calling the ReadBuffer<br>function with the first element of the array rather than the pointer<br>has worked...<br>_______________________________________________<br>Lazarus mailing list<br><a ymailto="mailto:Lazarus@lazarus.freepascal.org" href="/mc/compose?to=Lazarus@lazarus.freepascal.org">Lazarus@lazarus.freepascal.org</a><br><a href="http://www.lazarus.freepascal.org/mailman/listinfo/lazarus" target="_blank">http://www.lazarus.freepascal.org/mailman/listinfo/lazarus</a><br></div></blockquote></td></tr></table><br>