Skip to content

Latest commit

 

History

History
65 lines (52 loc) · 2.03 KB

outstream-write-textconst-integer-method.md

File metadata and controls

65 lines (52 loc) · 2.03 KB
title description ms.author ms.date ms.tgt_pltfrm ms.topic author
OutStream.Write(TextConst [, Integer]) Method
Writes a specified number of bytes to the stream.
solsen
02/26/2024
na
reference
SusanneWindfeldPedersen

OutStream.Write(TextConst [, Integer]) Method

Version: Available or changed with runtime version 3.0.

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

Syntax

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

Parameters

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

Value
 Type: TextConst
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.

Example

This example requires that you create the following variables.

 var
    recBinaries: Record "Company Information";
    OStream: OutStream;
    TxtConst: Label 'Hello World';
begin
    recBinaries.Find('-');  
    recBinaries.Picture.CreateOutstream(OStream);   
    OStream.Write(TxtConst);  
    recBinaries.Modify();  
end;

See Also

OutStream Data Type
Get Started with AL
Developing Extensions