Thread overview
Checking if a function pointer is set or null
Apr 09, 2018
solidstate1991
Apr 09, 2018
Uknown
Apr 09, 2018
Jonathan M Davis
April 09, 2018
Would the if(!(myFunctionPointer is null)){<dostuff>} work is I intended?
April 09, 2018
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
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