5.119 LinkValueStampCompare

 procedure LinkValueStampCompare(
   LinkValueStamp stamp1,
   LinkValueStamp stamp2): integer

Informative summary of behavior: The LinkValueStampCompare procedure compares two LinkValueStamps, stamp1 and stamp2. If stamp1 > stamp2 then the procedure returns an integer with a value greater than 0. If stamp1 = stamp2 then the procedure returns 0. If stamp1 < stamp2 then the procedure returns an integer value less than 0.

  
 d: integer
  
 d := 0
  
 if stamp1.dwVersion ≠ 0 and stamp2.dwVersion = 0 then
   d := 1
 else if stamp1.dwVersion = 0 and stamp2.dwVersion ≠ 0 then
   d := -1
 endif
  
 if d = 0 then
   if stamp1.timeCreated > stamp2.timeCreated then
     d := 1
   else if stamp1.timeCreated < stamp2.timeCreated then
     d := -1
   endif
 endif
  
 if d = 0 then
   /* The value of d will be the re result of stamp1.dwVersion - 
    * stamp2.dwVersion, cast as a 32-bit integer. For example, if 
    * stamp1.dwVersion is 1 and stamp2.dwVersion is 3, d is -2. If 
    * stamp1.dwVersion is 5 and stamp2.dwVersion is 0xFFFFFFFA,
    * d is 11.
    */
   d := stamp1.dwVersion - stamp2.dwVersion
 endif
  
 if d = 0 then
   if stamp1.timeChanged > stamp2.timeChanged then
     d := 1
   else if stamp1.timeChanged < stamp2.timeChanged then
     d := -1
   endif
 endif
  
 if d = 0 then
   if stamp1.uuidOriginating > stamp2.uuidOriginating then
     d := 1
   else if stamp1.uuidOriginating < stamp2.uuidOriginating then
     d := -1
   endif
 endif
  
 return d
Show: