Skip to content

TFPVersion

Represents a Free Pascal version number

Declaration

Source position: fpmkunit.pp line 440

type

  TFPVersion = class(TPersistent)
  public
    procedure Clear;
    procedure Assign;
    function CompareVersion : Integer;
    function SameVersion : Boolean;
    property AsString: string; {rw}
    property Empty: Boolean; {r}
  published
    property Major: Integer; {rw}
    property Minor: Integer; {rw}
    property Micro: Integer; {rw}
    property Build: Integer; {rw}
  end;

Description

Class that encapsulates a Free Pascal version number with major, minor, micro, and build components. Provides methods for version comparison, parsing from strings, and formatting to strings.

Properties

Member Visibility Description
AsString public Version number as formatted string
Build published Build version number
Empty read only public Whether the version number is empty
Major published Major version number
Micro published Micro version number
Minor published Minor version number
See all Properties

Methods

Member Visibility Description
Assign public Assign version from another source
Clear public Clear the version number to empty state
CompareVersion public Compare this version with another version
SameVersion public Check if versions are identical
See all Methods