Hi all I have a function pointer type like this.
type FuncPtr = proc(x : int)
type
Sample = ref object of RootObj
fPtr : FuncPtr
# other members
var smp = newSample()
# Now, i need to check fptr contains any valid function pointer or not --
if smp.fPtr : smp.fPtr(150)
How to do this check ? if smp.fPtr != nil: smp.fPtr(150)
It's a bit like natural language, you cannot say "if one then we're all doomed", but you can say "if true then we're all doomed".