Is there a simple way to do this without getting the "version defined after use" error? version(Ansi) { } else version(Unicode) { } else { Version = Unicode; } I've resorted to this, but it seems hackish: version(Ansi) { version = Ansi_ForReal; } else version(Unicode) { version = Unicode_ForReal; } else { Version = Unicode_ForReal; }