System.Classes.TWriter.WriteInteger
Delphi
procedure WriteInteger(Value: Integer); overload;
procedure WriteInteger(Value: Int64); overload;
C++
void __fastcall WriteInteger(int Value)/* overload */;
void __fastcall WriteInteger(__int64 Value)/* overload */;
Properties
| Type | Visibility | Source | Unit | Parent |
|---|---|---|---|---|
procedure function |
public | System.Classes.pas System.Classes.hpp |
System.Classes | TWriter |
Description
Writes the passed Value integer value to the writer object's stream.
WriteInteger is used internally by the component streaming system to write integer component properties to the writer object's stream.
WriteInteger first checks whether the passed integer Value can be represented in the smallest of the Int8, Int16, Int32, or Int64 types. Then WriteInteger calls WriteValue to write the value-type indicator of the obtained type (for example, WriteValue(vaInt8) if Value can be represented as the Int8 size integer.) Then WriteInteger calls Write to write the passed Value in the obtained size integer data.
WriteInteger advances the current position after the last written byte.