version with identifier and number

Frank Benoit (keinfarbton) benoit at tionex.removethispart.de
Mon Nov 13 12:12:59 PST 2006


Version can be an identifier or an integer.

But there is a need for having the combination:

- If there is a change in the dmd frontend, which makes source code
incompatible, but you want to have your source compiling with the old
and new dmd version.
- If a used lib changes its interface


The dmd commandline switch can look like this:
-version="MyId=23"
or
-version=MyId,23


The version statement can look like this:

version( MyId, 23 ){
	// 23 and higher
}
else version( MyId, 15 ){
	// 15 .. 22
}
else{
	// 0 .. 14
}

See also http://www.digitalmars.com/d/version.html




More information about the Digitalmars-d mailing list