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


Set value of an ordinal property


Source position: typinfo.pp line 347

procedure SetOrdProp(

  Instance: TObject;

  PropInfo: PPropInfo;

  Value: Int64


procedure SetOrdProp(

  Instance: TObject;

  const PropName: string;

  Value: Int64



SetOrdProp assigns Value to the ordinal property described by PropInfo or with name Propname for 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.
If the base type of the set has less than 31 possible values. For each possible value; the corresponding bit of Value must be set.

For an example, see GetOrdProp.


No checking is done whether Instance is non-nil, or whether PropInfo describes a valid ordinal property of Instance. No range checking is performed. Specifying an invalid property name in PropName will result in an EPropertyError exception.

See also



Get the value of an ordinal property



Set value of a string property



Set value of a float property.



Set value of a Int64 property



Set the value of a method property

Documentation generated on: Mar 17 2017