Congratulation, so this case was closed

=============INTOSOFT============

           ALEXIO CHAOS

   [email protected]   

          Yahoo Messager

=================================

--- On Mon, 1/19/09, Dave Coventry <[email protected]> wrote:

From: Dave Coventry <[email protected]>
Subject: Re: [Lazarus] Passing an array to a function
To: "General mailing list" <[email protected]>
Date: Monday, January 19, 2009, 9:34 PM

2009/1/20 Darmawan Sugiarto <[email protected]>:
> Can you give more information about your function.

Sure:


function FieldValueAsString(var fsbuffer: TByteBuffer;
fitype,marker,fisize: integer): string;
begin
  case fitype of
43,52,108:Result:=inttostr(LEtoN(PLongint(@fsbuffer[marker])^));
 50:Result:=inttostr(LEtoN(PSmallInt(@fsbuffer[marker])^));
end;
end;

It was failing before it got there, so I don't think the problem was
with the function.

In any case, Martin's suggestion regarding calling the ReadBuffer
function with the first element of the array rather than the pointer
has worked...
_______________________________________________
Lazarus mailing list
[email protected]
http://www.lazarus.freepascal.org/mailman/listinfo/lazarus



      
_______________________________________________
Lazarus mailing list
[email protected]
http://www.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to