Syntax

code

Function: CompareVersion;

Description

Compares 2 different versions of PlanSwift.

Code Reference

  • 1. Create a New Form application
  • 2. Add a button to the form
  • 3. add Planswift to reference (Planswift9_tlb in the uses)
  • 4. copy code to button onclick event

code

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

procedure pscompareversion;

var

  vera: widestring;

  varb: widestring;

  ps: IPlanSwift;

  nrslt: Integer;

begin

  //Create Planswift Interface

  ps := coplanswift.Create;

  //get Verison of planswift

  vera := ps.CurrentVersion;

  varb := '9.0.0';

  //Compare the two version

  nrslt := ps.CompareVersion(vera,varb);

  //Get the resulting value

  ShowMessage(intToStr(nrslt));

  //free Planswift Interface

  ps := nil;

end;