System.Classes.TWriter.WriteVariant
Delphi
procedure WriteVariant(const Value: Variant);
C++
void __fastcall WriteVariant(const System::Variant &Value);
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
procedure function |
public | System.Classes.pas System.Classes.hpp |
System.Classes | TWriter |
Description
Writes the Variant type data, passed in Value
, to the writer object's stream.
WriteVariant is used internally by the streaming system to write Variant type properties of components to the writer object's stream.
WriteVariant first analyze the Variant type of the passed Value
data and calls WriteValue to write a corresponding value-type indicator. Then WriteVariant calls Write to write the passed Value
data to the writer object's stream.
If the passed Value
is not an array or WriteVariant cannot write the passed Value
data, then WriteVariant raises an EWriteError exception.
WriteVariant advances the current position after the last written byte.