You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In nearly all languages, if is scoped - that is, variables declared within its scope are inaccessible to the enclosing scope. Some languages have another kind of if statement which is unscoped, for instance the C #if preprocessor directive.
The unscoped iff statement will be identical to the if statement except that it has no impact on scope. Both the scoped if and unscoped iff may appear in any scope (e.g. not within a function scope), this is only really useful for iff to make conditional declarations.
The text was updated successfully, but these errors were encountered:
I want to elaborate on this. The condition must be labeled and all code that accesses the conditional declarations must be in iff statements with the same conditions. && should probably also be allowed, but how freeform should this become? I worry that unrestricted usage is no better than #if in C.
In nearly all languages,
if
is scoped - that is, variables declared within its scope are inaccessible to the enclosing scope. Some languages have another kind of if statement which is unscoped, for instance the C#if
preprocessor directive.The unscoped
iff
statement will be identical to theif
statement except that it has no impact on scope. Both the scopedif
and unscopediff
may appear in any scope (e.g. not within a function scope), this is only really useful foriff
to make conditional declarations.The text was updated successfully, but these errors were encountered: