Thread overview | |||||
---|---|---|---|---|---|
|
April 09, 2018 Checking if a function pointer is set or null | ||||
---|---|---|---|---|
| ||||
Would the if(!(myFunctionPointer is null)){<dostuff>} work is I intended? |
April 09, 2018 Re: Checking if a function pointer is set or null | ||||
---|---|---|---|---|
| ||||
Posted in reply to solidstate1991 | On Monday, 9 April 2018 at 00:25:08 UTC, solidstate1991 wrote: > Would the if(!(myFunctionPointer is null)){<dostuff>} work is I intended? Yes, that works as you expect https://run.dlang.io/is/ZTtm0P |
April 08, 2018 Re: Checking if a function pointer is set or null | ||||
---|---|---|---|---|
| ||||
Posted in reply to solidstate1991 | On Monday, April 09, 2018 00:25:08 solidstate1991 via Digitalmars-d-learn wrote:
> Would the if(!(myFunctionPointer is null)){<dostuff>} work is I
> intended?
You can also do
if(myFunctionPointer !is null)
- Jonathan M Davis
|
Copyright © 1999-2021 by the D Language Foundation