request switch statement with common block
Andre Artus
andre.artus at gmail.com
Mon Aug 5 15:13:28 PDT 2013
> Borislav Kosharov wrote:
>
> Speaking of contracts, and reading the docs I see:
> "Pre and Post Contracts
>
> The pre contracts specify the preconditions before a statement
> is executed. The most typical use of this would be in
> validating the parameters to a function. The post contracts
> validate the result of the statement. The most typical use of
> this would be in validating the return value of a function and
> of any side effects it has..."
>
> So are contracts possible outside function declarations? For
> example just scopes or random places in code.
They should not be. Other than the 'invariant' which is on the
class/interface.
More information about the Digitalmars-d
mailing list