Skip to content

Instantly share code, notes, and snippets.

@dkstar88
dkstar88 / version.pas
Created August 1, 2013 08:51
A generic Version structure utilizing operator override feature in Delphi versions. Currently it supports comparison, and not so useful addition and substraction. Now you can do TVersion('1.0.2.3') > TVersion('1.0.2.2') I also put AppVersion, which returns the version of your running application for both Windows and MacOS. So checking where if t…
unit Version;
interface
uses Types;
type
TVersion = record
Major, Minor, Release, Build: Word;