Code: Select all
IsCallable(obj) { ; if callable, returns truthy minimum params + 1 (returns -1 for BoundFunc), else 0/false
return (t:=type(obj))=='Closure' or t=='Func' ? obj.minparams+1 : t=='BoundFunc' ? -1 : 0
}
Code: Select all
IsCallable(obj) { ; if callable, returns truthy minimum params + 1 (returns -1 for BoundFunc), else 0/false
return (t:=type(obj))=='Closure' or t=='Func' ? obj.minparams+1 : t=='BoundFunc' ? -1 : 0
}
Return to “AutoHotkey Development”
Users browsing this forum: OpalMonkey and 34 guests