Breyta

Deila með


OutStream.Write(BigInteger [, Integer]) Method

Version: Available or changed with runtime version 1.0.

Writes a specified number of bytes to the stream. Data is written in binary format.

Syntax

[Written := ]  OutStream.Write(Value: BigInteger [, Length: Integer])

Parameters

OutStream
 Type: OutStream
An instance of the OutStream data type.

Value
 Type: BigInteger
Contains the data to be written.

[Optional] Length
 Type: Integer
The number of bytes to be written. In the case of data types other than string, code, and binary, if you specify a length that differs from the size of the variable, an error message is displayed.

Return Value

[Optional] Written
 Type: Integer
The number of bytes that were written. If you omit this optional return value and the operation does not execute successfully, a runtime error will occur.

Remarks

Write adds a zero byte at the end of the stream. This is differs from WriteText, which does not. For more information about how zero bytes and line endings are written and read, see Write, WriteText, Read, and ReadText Method Behavior Regarding Line Endings and Zero Terminators.

If the optional return value, Written, is not specified and it was not possible to write all the data, an error message is displayed.

If the return value is present, you must verify that all the data was streamed.

Example

recBinaries.Find('-');  
recBinaries.Data.CreateOutstream(OutStream);  
OutStream.Write('Secretary');  
OutStream.Write('Alice');  
OutStream.Write('Hart');  
OutStream.Write(19960106D);  
recBinaries.Modify();  

OutStream Data Type
Get Started with AL
Developing Extensions