C Structure class > Methods xHarbour Developers Network  

oC Structure class:buffer()

Assigns a binary character string to the internal buffer.

Syntax

:buffer( <cBuffer>, [<lRecurse>] ) --> self

Arguments

<cBuffer>
This is a character string with replaces the internal binary buffer of a structure object.
<lRecurse>
This parameter defaults to .F. (false). It should be set to .T. (true) when the structure object maintains a nested structure. That is, it contains other structure objects in its instance variables.

Description

Method :buffer() is used to change the internal binary buffer of a structure object. <cBuffer> must be a binary character string with :sizeOf() bytes. If the string contains less characters, Chr(0) is added up to the correct length. The method extracts the values for each structure member from <cBuffer> and assigns them to the corresponding instance variables of the structure object.


Copyright © 2006-2007 xHarbour.com Inc. All rights reserved.
http://www.xHarbour.com
Created by docmaker.exe