scoped imports
H. S. Teoh
hsteoh at quickfur.ath.cx
Sat Aug 17 15:36:14 PDT 2013
On Sat, Aug 17, 2013 at 03:29:56PM -0700, Timothee Cour wrote:
[...]
> Related question:
>
> Why isn't the following allowed:
> ----
> void fun(){
> // code without version=A
> version=A;
> // code with version=A
> vesion(none):
> //code versioned out
> }
> ----
> I understand the grammar doesn't allow it, but what's the rationale,
> and can it be fixed?
Not exactly sure what you're trying to achieve, but isn't this what you
want:
void fun() {
version(A) {
...
} else {
..
}
}
?
Or are you trying to change version=A inside the function?
T
--
"Outlook not so good." That magic 8-ball knows everything! I'll ask about Exchange Server next. -- (Stolen from the net)
More information about the Digitalmars-d-learn
mailing list