What's the D way of application version numbers?

Russel Winder russel at winder.org.uk
Mon Jan 13 03:38:50 PST 2014


On Sun, 2014-01-12 at 19:11 +0000, Adam D. Ruppe wrote:
[…]
> 
> enum version = import("VERSION");
> // use it now like any other string in D

Calling a string an enum seemed discordant, and version is sort of a
reserved word (at least as far as Emacs D-Mode colorizing is concerned)
so in the end I went with:

immutable auto versionNumber = strip(import("VERSION"));

which seems to do the job very nicely. Thanks for your response to my
original question, most helpful. :-)

-- 
Russel.
=============================================================================
Dr Russel Winder      t: +44 20 7585 2200   voip: sip:russel.winder at ekiga.net
41 Buckmaster Road    m: +44 7770 465 077   xmpp: russel at winder.org.uk
London SW11 1EN, UK   w: www.russel.org.uk  skype: russel_winder



More information about the Digitalmars-d-learn mailing list