[Overview][Constants][Types][Classes][Procedures and functions] Reference for unit 'typinfo' (#rtl)

SetOrdProp

Set value of an ordinal property

Declaration

Source position: line 0

procedure SetOrdProp(

  Instance: TObject;

  PropInfo: PPropInfo;

  Value: Int64

);

procedure SetOrdProp(

  Instance: TObject;

  const PropName: String;

  Value: Int64

);

Description

SetOrdPropassigns Valueto the the ordinal property described by PropInfoor with name Propnamefor the object Instance.

Ordinal properties that can be set include:

Integers and subranges of integers
The actual value of the integer must be passed.
Enumerated types and subranges of enumerated types
The ordinal value of the enumerated type must be passed.
Subrange types
of integers or enumerated types. Here the ordinal value must be passed.
Sets
If the base type of the set has less than 31 possible values. For each possible value; the corresponding bit of Valuemust be set.

For an example, see GetOrdProp.

Errors

No checking is done whether Instanceis non-nil, or whether PropInfodescribes a valid ordinal property of Instance. No range checking is performed. Specifying an invalid property name in PropNamewill result in an EPropertyErrorexception.

See also

GetOrdProp

  

Get the value of an ordinal property

SetStrProp

  

Set value of a string property

SetFloatProp

  

Set value of a float property.

SetInt64Prop

  

Set value of a Int64 property

SetMethodProp

  

Set the value of a method property