-Upgrading LambdaCore to 1.8.0-
This verb is essentially the same as $code_utils:find_verb_named but starts from the last verb (helpful in @rmverb). It also searches from the last numbered verb and uses the number directly instead of tostr()ing it. Like :find_verb_named, returns 0 if no such verb was found instead of -1 (but can be changed for compatibility by putting return -1; at the end). @program $code_utils:find_last_verb_named ":find_last_verb_named(object,name[,n])"; " returns the *number* of the last verb on object matching the given name."; " optional argument n, if given, starts the search with verb n-1,"; " causing verbs (n..length(verbs(object))) to be ignored."; " 0 is returned if no verb is found."; " This routine does not find inherited verbs."; {object, name, ?last = length(verbs(object))} = args; for i in [0..last - 1] verbinfo = verb_info(object, last - i); if (this:verbname_match(verbinfo[3], name)) return last - i; endif endfor .
-7-
[Previous Page][Next Page][Contents]