November 13, 2006 version with identifier and number | ||||
---|---|---|---|---|
| ||||
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 |
November 13, 2006 Re: version with identifier and number | ||||
---|---|---|---|---|
| ||||
Posted in reply to Frank Benoit (keinfarbton) | On Mon, 13 Nov 2006 12:12:59 -0800, Frank Benoit (keinfarbton) <benoit@tionex.removethispart.de> wrote: > 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 > Hmmm... sounds like a very good idea, especially as version 1.0 approaches. -JJR |
Copyright © 1999-2021 by the D Language Foundation