Checking if a function pointer is set or null

Jonathan M Davis newsgroup.d at jmdavisprog.com
Mon Apr 9 02:04:27 UTC 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



More information about the Digitalmars-d-learn mailing list