Code utilities (#38)

parse_propref("") => {"foo","bar"} (or 0 if arg. isn't a prop ref.)
parse_verbref("foo:bar") => {"foo","bar"} (or 0 if arg. isn't a verb ref.)
parse_fileref("foo!bar") => {"foo","bar"} (or 0 if arg. isn't a file ref.)
=> {{"any", "in front of", "this"},{"baz"...}}
(or string if args don't parse)

tonum(string) => number (or E_TYPE if string is not a number)
toobj(string) => object (or E_TYPE if string is not an object)
toerr(number or string) => error value (or 1 if out of range or unrecognized)
error_name(error value) => name of error (e.g., error_name(E_PERM) => "E_PERM")

verb_perms() => the current task_perms (as set by set_task_perms()).
verb_location() => the object where the current verb is defined.
verb_documentation([object,verbname]) => documentation at beginning of
verb code, if any -- default is the calling verb
task_valid([tid]) => return true iff the specified task is valid .

Preposition routines

prepositions() => full list of prepostions
full_prep ("in") => "in/inside/into"
short_prep("into") => "in"
short_prep("in/inside/into") => "in"
get_prep ("off", "of", "the", "table") => {"off of", "the", "table"}

Verb routines

verbname_match (fullname,name) => can `name' be used to call `fullname'
find_verb_named (object,name[,n]) => verb number or -1 if not found
find_callable_verb_named (object,name[,n]) => verb number or -1 if not found
find_verbs_containing (pattern[,object|objlist])

Dirty work for explain_syntax


A random but useful verb

verb_or_property(object,name[,@args]) => result of verb or property call,

$queue management

select(queue[, queue[, queue]] ...) => first queue to show activity
poll(queue[, queue[, queue]] ...) => Random queue with data waiting, or #-1 if all are empty.

You are not logged in.

[home | help | who | search | setup | code]