HTML Utilities

Showing help on 'functions'

There are many, many built-in functions available to MOO programmers. The following list gives a brief summary of the arguments and purpose of each function; for more information, see the LambdaMOO Programmer's Manual.

pass -- calling a verb defined on this object's parent

time -- current time in seconds since midnight GMT, 1 Jan 70
ctime -- time (or current time) converted to a human-readable string

eval -- parsing and executing strings as MOO code

typeof -- determining the data type of a value
tostr -- converting any set of values into a string
toint -- converting any non-list value into an integer
tonum -- converting any non-list value into an integer (obsolete)
tofloat -- converting any non-list value into a floating-point
toobj -- converting any non-list value into an object
toliteral -- converting any value into a literal string
length -- returns the length of a string or list

equal -- is val1 indistinguishable from val2
min -- minimum of n1,n2,...
max -- maximum of n1,n2,...
abs -- absolute value of n
sin -- sine, cosine, tangent of n
asin -- arc-sine, arc-cosine, arc-tangent of n
sinh -- hyperbolic sine, cosine, tangent of n
exp -- `e' raised to the power of n
log -- natural or base 10 logarithm of n (n > 0)
sqrt -- square root of n, rounded down
random -- random integer between 1 and n inclusive
floatstr -- format a floating-point into string
ceil -- smallest integer > float f as a floating-point
floor -- largest integer < float f as floating-point
trunc -- truncate f at the decimal point, as floating-point

index -- index of first str2 in str1
rindex -- index of last str2 in str1
strcmp -- case-sensitive string comparison
strsub -- substitution in a string
match -- match first regular expr str2 in str1
rmatch -- match last regular expr str2 in str1
substitute -- perform substitutions on template

decode_binary -- convert from a binary string
encode_binary -- convert to a binary string
crypt -- one-way string encryption
string_hash -- MD5 cryptographically secure hash of text
binary_hash -- same but for a binary string
value_hash -- string_hash(toliteral(value))

is_member -- is exact value (case sensitive) in list
listappend -- adding an element at the end of a list
listinsert -- adding an element at the head of a list
listset -- updating a list at some index
listdelete -- removing an element from a list
setadd -- adding an element to a set represented as a list
setremove -- removing an element from such a set

valid -- testing whether an object exists
create -- creating a new MOO object
recycle -- destroying a MOO object
move -- altering the object-containment hierarchy
chparent -- altering the object-inheritance hierarchy
parent -- object's parent in the inheritance hierarchy
children -- object's children in the inheritance hierarchy
max_object -- the highest-numbered object in the MOO
renumber -- changes an object's number to lowest available one (*)
reset_max_object -- resets max_object() to the largest valid object (*)

properties -- a list of the properties defined on an object
add_property -- add a new property
delete_property -- remove a property
property_info -- {owner, perms} info on a property
set_property_info -- setting same
is_clear_property -- find out if a property is "clear"
clear_property -- make a property "clear"

verbs -- a list of the verbs defined on an object
add_verb -- add a verb to an object
delete_verb -- remove a verb from an object
verb_info -- {owner, perms, names} info for a verb defn.
verb_args -- {dobj, prep, iobj} argument info for a verb
verb_code -- program listing
set_verb_info(object, verb-name, {owner, perms, names})
set_verb_args(object, verb-name, {dobj, prep, iobj})
set_verb_code(object, verb-name, {line, line, ...})
disassemble -- listing of server's internal `compile'

is_player -- testing whether or not object is a player
players -- a list of all players, active or not
connected_players -- a list of all currently-connected players
idle_seconds -- seconds since given player typed anything
connected_seconds -- seconds given player has been logged in
boot_player -- disconnect player from the MOO immediately(*)
set_player_flag -- set/clear player bit; boot player if clear(*)
connection_name -- a server-assigned name for player's connection

open_network_connection -- open a connection to another network site (*)
notify -- sending text to a player's terminal
read -- reading a line of input from the player (*)
buffered_output_length -- how much output pending
force_input -- put str in player's output queue
flush_input -- clear a player's output queue
output_delimiters -- return {prefix,suffix} set by PREFIX/SUFFIX cmds
set_connection_option -- set I/O options for player
connection_options -- list current I/O options for player
connection_option -- return setting of option for player

listen -- create server listening point (*)
u nlisten -- close the server listening point described by canon (*)
listeners -- list of all listening points

raise -- raise code just like an error
call_function -- call func-name
function_info -- descriptions of available built-in functions

caller_perms -- the player whose permissions your caller was using
set_task_perms -- changing permissions of the running task (*)
callers -- list of {obj, verb, owner, vloc, player}: this task's stack
suspend -- suspending the current task for a number of seconds
resume -- resume the given task with value returned
seconds_left -- number of seconds left in the current task
ticks_left -- number of ticks left in the current task
task_id -- a random number representing the currently-running task
queue_info -- who has tasks, or how many player has
queued_tasks -- list of {id,start,0,20000,owner,obj,verb,line,this}
kill_task -- delete one of your tasks from the queue
task_stack -- info about suspended task

server_log -- add a comment to the server log file
server_version -- a string of three numbers "major.minor.release"
memory_usage -- {{blocksize, nused, nfree}, ...}, the server's memory stats
shutdown -- print msg and kill the server (*)
dump_database -- what it says (*)
db_disk_size -- size in bytes of recent full database

value_bytes -- memory required to store value
object_bytes -- memory required to store object

(*) => as you might have expected, these usually require wizard permissions.



-- telnet://project-mongoose.net:7777 -- Mail us -- http://project-mongoose.net:7780/ --
-- Eight users connected --