Respond to an unknown method call: Difference between revisions

m
Line 722:
}
\\ modules, functions numeric and string, and variables can use same name
\\ here we have module invoke, funcitonfunction invoke, and function invoke$
Module invoke (&a, method$) {
param=(,)
Line 735:
call "."+method$, !param
}
} else Flush : Error "unkownunknown method "+method$ ' flush empty the stack
}
Function invoke (&a, method$) {
Line 747:
=Function("."+method$, ![])
}
} else Error "unkownunknown Function "+method$
}
\\ invoke string functions
Line 761:
=Function$("."+method$, ![])
}
} else Error "unkownunknown Function "+method$
}
Line 775:
\\ this method has a weak reference to obj, so anytime we use This. or just dot, this weak reference make the real name to execute
Obj.a 10,20
\\ call the fake method (can't access object methods anand properties), has empty weak reference to object
obj.alfa 10, 20
Line 781:
\\ to check if a method (module) exist, we have to compare this object with other temporary object
\\ we make one with the method name and empty definition, and then check if obj has anything this temp object has
\\ arguments passed in a tuple (optional), so we didn't leave stack with unused items, if we have an unkownunknown method.
invoke &obj, "a", (10, 20)
invoke &obj, "NoParam"
Anonymous user