August 26, 2021 Re: Scope of Mixins | ||||
---|---|---|---|---|
| ||||
Posted in reply to DLearner | On Thursday, 26 August 2021 at 19:31:54 UTC, DLearner wrote:
> if (typeof(v).stringof == "int" ) {
Tip: you can instead of string of do
if (is(typeof(v) == int))
That is operator lets you compare types directly.
(stringof is something you will almost never use as you learn more of the language)
|
Copyright © 1999-2021 by the D Language Foundation