Kfuns | ||||||||
| Line: 10 to 10 | ||||||||
|---|---|---|---|---|---|---|---|---|
acos() | ||||||||
| Changed: | ||||||||
| < < |
'''Definition:''' float acos(float x) | |||||||
| > > |
| |||||||
| Changed: | ||||||||
| < < |
'''Requires:''' -1 <= x <= 1 | |||||||
| > > |
| |||||||
| Changed: | ||||||||
| < < |
'''Returns:''' The arc cosine of x. | |||||||
| > > |
| |||||||
asin() | ||||||||
| Changed: | ||||||||
| < < |
'''Definition:''' float asin(float x) | |||||||
| > > |
| |||||||
| Changed: | ||||||||
| < < |
'''Requires:''' -1 <= x <= 1 | |||||||
| > > |
| |||||||
| Changed: | ||||||||
| < < |
'''Returns:''' The arc sine of x. | |||||||
| > > |
| |||||||
atan() | ||||||||
| Changed: | ||||||||
| < < |
'''Definition:''' float atan(float x) | |||||||
| > > |
| |||||||
| Changed: | ||||||||
| < < |
'''Returns:''' The arc tangent of x. | |||||||
| > > |
| |||||||
atan2() | ||||||||
| Changed: | ||||||||
| < < |
'''Definition:''' float atan2(float y, float x) | |||||||
| > > |
| |||||||
| Changed: | ||||||||
| < < |
'''Returns:''' The arc tangent of y/x, determining the quadrant of the result from the signs of x and y. | |||||||
| > > |
| |||||||
ceil() | ||||||||
| Changed: | ||||||||
| < < |
'''Definition:''' float ceil(float x) | |||||||
| > > |
| |||||||
| Changed: | ||||||||
| < < |
'''Returns:''' x rounded to the next highest integer (that is 0.4 -> 1.0, while -0.4 -> 0.0). | |||||||
| > > |
| |||||||
cos() | ||||||||
| Changed: | ||||||||
| < < |
'''Definition:''' float cos(float x) | |||||||
| > > |
| |||||||
| Changed: | ||||||||
| < < |
'''Requires:''' That x not be too large (due to the way floats work, when x is greater than about 1e9, the accuracy of cos will be too low for it to be used reliably). | |||||||
| > > |
| |||||||
| Changed: | ||||||||
| < < |
'''Returns:''' The cosine of the argument. | |||||||
| > > |
| |||||||
cohs() | ||||||||
| Changed: | ||||||||
| < < |
'''Definition:''' float cosh(float x) | |||||||
| > > |
| |||||||
| Changed: | ||||||||
| < < |
'''Errors:''' If the calculated result is too large, an error will result. | |||||||
| > > |
| |||||||
| Changed: | ||||||||
| < < |
'''Returns:''' The hyperbolic cosine of the argument. | |||||||
| > > |
| |||||||
exp() | ||||||||
| Changed: | ||||||||
| < < |
'''Definition:''' float exp(float x) | |||||||
| > > |
| |||||||
| Changed: | ||||||||
| < < |
'''Returns:''' The exponential value of the given argument. | |||||||
| > > |
| |||||||
| Changed: | ||||||||
| < < |
'''Error:''' If the result is larger than a float can hold, it will generate and error. | |||||||
| > > |
| |||||||
fabs() | ||||||||
| Changed: | ||||||||
| < < |
'''Definition:''' float fabs(float x) | |||||||
| > > |
| |||||||
| Changed: | ||||||||
| < < |
'''Returns:''' The absolute value of x. | |||||||
| > > |
| |||||||
floor() | ||||||||
| Changed: | ||||||||
| < < |
'''Definition:''' float floor(float x) | |||||||
| > > |
| |||||||
| Changed: | ||||||||
| < < |
'''Returns:''' x rounded to the next lowest integer (that is 0.4 -> 0.0, while -0.4 -> -1.0). | |||||||
| > > |
| |||||||
fmod() | ||||||||
| Changed: | ||||||||
| < < |
'''Definition:''' float fmod(float x, float y) | |||||||
| > > |
| |||||||
| Changed: | ||||||||
| < < |
'''Requires:''' y = 0.0 | |||||||
| > > |
| |||||||
| Changed: | ||||||||
| < < |
'''Returns:''' The value f, for which there exists an integer k such that k * y + f == x, f has the same sign of x, and the absolute value of f is less than the absolute value of y. | |||||||
| > > |
| |||||||
frexp() | ||||||||
| Changed: | ||||||||
| < < |
'''Definition:''' mixed *frexp(float x) | |||||||
| > > |
| |||||||
| Changed: | ||||||||
| < < |
'''Returns:''' ({y, n}), such that y*2^n = x and y = 0.0 or 0.5 <= |y| < 1.0. If x = 0.0, the result will be (0.0, 0.0). | |||||||
| > > |
| |||||||
Arrayallocate() | ||||||||
| Changed: | ||||||||
| < < |
'''Definition:''' mixed *allocate(int size) | |||||||
| > > |
| |||||||
| Changed: | ||||||||
| < < |
'''Requires:''' 0 <= size <= status()[ST_ARRAYSIZE] | |||||||
| > > |
| |||||||
| Changed: | ||||||||
| < < |
'''Returns:''' An array of the given size, with all elements initialised to nil. | |||||||
| > > |
| |||||||
allocate_float() | ||||||||
| Changed: | ||||||||
| < < |
'''Definition:''' float *allocate_float(int size) | |||||||
| > > |
| |||||||
| Changed: | ||||||||
| < < |
'''Requires:''' 0 <= size <= status()[ST_ARRAYSIZE] | |||||||
| > > |
| |||||||
| Changed: | ||||||||
| < < |
'''Returns:''' An array of floats of the given size, with all elements initialised to 0.0. | |||||||
| > > |
| |||||||
allocate_int() | ||||||||
| Changed: | ||||||||
| < < |
'''Definition:''' float *allocate_int(int size) | |||||||
| > > |
| |||||||
| Changed: | ||||||||
| < < |
'''Requires:''' 0 <= size <= status()[ST_ARRAYSIZE] | |||||||
| > > |
| |||||||
| Changed: | ||||||||
| < < |
'''Returns:''' An array of ints of the given size, with all elements initialised to 0. | |||||||
| > > |
| |||||||
Connectionblock_input() | ||||||||
| Changed: | ||||||||
| < < |
'''Definition:''' void block_input(int flag) | |||||||
| > > |
| |||||||
| Changed: | ||||||||
| < < |
'''Effect:''' Will block or unblock all input from the user associated with the current object, on a non-zero or zero flag respectively. | |||||||
| > > |
| |||||||
LPC objectcall_other() | ||||||||
| Changed: | ||||||||
| < < |
'''Definition:''' mixed call_other(mixed obj, string function, mixed args...) | |||||||
| > > |
| |||||||
| Changed: | ||||||||
| < < |
'''Requires:''' obj must be either a string giving the path of a compiled object or an object. | |||||||
| > > |
| |||||||
| Changed: | ||||||||
| < < |
'''Effect:''' Will call the given function in obj, passing the given arguments. The function will not be called if it is private, or if it is static and obj = this_object(). | |||||||
| > > |
| |||||||
| Changed: | ||||||||
| < < |
'''Returns:''' The result of the called function or nil if the function doesn't exist or cannot be called with call_other(). | |||||||
| > > |
| |||||||
| Changed: | ||||||||
| < < |
'''Note:''' The -> operator is shorthand for this function. obj->function(arg1, arg2) is equivalent to call_other(obj, "function", arg1, arg2). | |||||||
| > > |
| |||||||
call_out() | ||||||||
| Changed: | ||||||||
| < < |
'''Definition:''' int call_out(string function, mixed delay, mixed args...) | |||||||
| > > |
| |||||||
| Changed: | ||||||||
| < < |
'''Requires:''' Delay must either be an integer >= 0, or a float >= 0.0 and <= 60.0. Also, the number of existing callouts is less than the value of ST_COTABSIZE in the array returned by status(). | |||||||
| > > |
| |||||||
| Changed: | ||||||||
| < < |
'''Effect:''' Will call the function on this object after the delay has passed, with the arguments. | |||||||
| > > |
| |||||||
| Changed: | ||||||||
| < < |
'''Returns:''' The call_out handle (reference). | |||||||
| > > |
| |||||||
| Changed: | ||||||||
| < < |
'''Note:''' If the maximum number of callouts is set to zero, call_out() will be ignored with no error. | |||||||
| > > |
| |||||||
clone_object() | ||||||||
| Changed: | ||||||||
| < < |
'''Definition:''' object clone_object(object master) | |||||||
| > > |
| |||||||
| Changed: | ||||||||
| < < |
'''Requires:''' That the master object must not itself be a clone. | |||||||
| > > |
| |||||||
| Changed: | ||||||||
| < < |
'''Effects:''' Creates a clone of the master object with a unique name ("my_object#1234" for instance). The create(int clone) function will be called on the new object immediately, where "clone" is the number of the clone (1234 in this case). | |||||||
| > > |
| |||||||
| Changed: | ||||||||
| < < |
'''Returns:''' The new object. | |||||||
| > > |
| |||||||
compile_object() | ||||||||
| Changed: | ||||||||
| < < |
'''Definition:''' object compile_object(string file) | |||||||
| > > |
| |||||||
| Changed: | ||||||||
| < < |
'''Requires:''' That if the object already exists, that it not be inherited by anything. file must give the full path of the file, including the extension (".c"). | |||||||
| > > |
| |||||||
| Changed: | ||||||||
| < < |
'''Effects:''' Creates an object whose name will be the file argument. ("my_object#1234" for instance). The create(int clone) function will be called on the new object immediately, where "clone" is the number of the clone (1234 in this case). If the file already exists, then at the end of the thread all clones will be updated. Any existing variables will be kept if the new master object also has those variables and they are the same type - otherwise they will be lost. | |||||||
| > > |
| |||||||
| Changed: | ||||||||
| < < |
'''Errors:''' Compilation errors are reported to the driver, and a runtime error will occur as will if compilation fails. | |||||||
| > > |
| |||||||
| Changed: | ||||||||
| < < |
'''Returns:''' The new object. | |||||||
| > > |
| |||||||
destruct_object() | ||||||||
| Changed: | ||||||||
| < < |
'''Definition:''' void destruct_object(object obj) | |||||||
| > > |
| |||||||
| Changed: | ||||||||
| < < |
'''Effects:''' Destroys obj. If the caller is obj itself, it will be destroyed as soon as execution leaves it. If the last reference to a master object is removed, remove_program(objname) will be called on the driver. | |||||||
| > > |
| |||||||
| Changed: | ||||||||
| < < |
'''Errors:''' If an object destructs itself, avoid doing anything after the call to destruct - in particular, call_other will prevoke an error. Basically, try to fast-track your way out of the object as quickly as possible. | |||||||
| > > |
| |||||||
find_object() | ||||||||
| Changed: | ||||||||
| < < |
'''Definition:''' object find_object(string obj) | |||||||
| > > |
| |||||||
| Changed: | ||||||||
| < < |
'''Returns:''' The object whose path is obj, if there is one. Otherwise, nil. | |||||||
| > > |
| |||||||
function_object() | ||||||||
| Changed: | ||||||||
| < < |
'''Definition:''' string function_object(string function, object obj) | |||||||
| > > |
| |||||||
| Changed: | ||||||||
| < < |
'''Returns:''' The name of the class which obj inherits the function from (could be the name of obj), or nil if the function doesn't exist or is not callable with call_other(). | |||||||
| > > |
| |||||||
Runtimecall_trace() | ||||||||
| Changed: | ||||||||
| < < |
'''Definition:''' mixed **call_trace() | |||||||
| > > |
| |||||||
| Changed: | ||||||||
| < < |
'''Returns:''' An array representing the stack of the current thread. That is to say, every element of the array represents the position of the thread within a function. Each element of the array is in the following format: ({ objname, progname, function, line, extern, arg1, ..., argn }), where: | |||||||
| > > |
| |||||||
| ||||||||
| Line: 209 to 209 | ||||||||
| ||||||||
| Changed: | ||||||||
| < < |
'''Notes:''' There are many uses for call_trace. It is used for [wiki:ThreadLocalStorage thread local storage] and debug messages in the KernelLib, for instance. | |||||||
| > > |
| |||||||
error() | ||||||||
| Changed: | ||||||||
| < < |
'''Description:''' void error(string errormessage) | |||||||
| > > |
| |||||||
| Changed: | ||||||||
| < < |
'''Effect:''' Causes an error, which will stop execution unless caught. | |||||||
| > > |
| |||||||
Encryption/Decryption and Error Detectioncrypt() | ||||||||
| Changed: | ||||||||
| < < |
'''Definition:''' string crypt(string passwd, varargs string salt) | |||||||
| > > |
| |||||||
| Changed: | ||||||||
| < < |
'''Returns:''' An encrypted version of the string. Without the salt, it will be basically random. They way to use this as follows - first you take the raw form of the password, and run it though crypt to get an encrypted version. Afterwards, when you want to check a string to see if it is the password, run it though crypt using the encrypted version of the password as the salt. If the result is equal to the encrypted password, then they are the same. | |||||||
| > > |
| |||||||
| Changed: | ||||||||
| < < |
'''Note:''' Only the first 8 characters of the passwd and the first 2 characters of the salt are significant. | |||||||
| > > |
| |||||||
hash_crc16() | ||||||||
| Changed: | ||||||||
| < < |
'''Definition:''' int hash_crc16(string str, string extra...) | |||||||
| > > |
| |||||||
| Changed: | ||||||||
| < < |
'''Returns:''' Something. Um, perhaps someone can explain what this is, and a typical use for it? | |||||||
| > > |
| |||||||
hash_md5() | ||||||||
| Changed: | ||||||||
| < < |
'''Definition:''' string hash_md5(string str, string extra...) | |||||||
| > > |
| |||||||
| Changed: | ||||||||
| < < |
'''Returns:''' Something. Used for error detection? | |||||||
| > > |
| |||||||
Timectime() | ||||||||
| Changed: | ||||||||
| < < |
'''Definition:''' string ctime(int time) | |||||||
| > > |
| |||||||
| Changed: | ||||||||
| < < |
'''Returns:''' The string representation of time (as returned by time()), in the format: "Tue Aug 3 14:40:18 1993". | |||||||
| > > |
| |||||||
time() | ||||||||
| Changed: | ||||||||
| < < |
'''Definition:''' int time() | |||||||
| > > |
| |||||||
| Changed: | ||||||||
| < < |
'''Returns:''' The current time as an int. | |||||||
| > > |
| |||||||
| Changed: | ||||||||
| < < |
'''Note:''' Persumably it returns the number of seconds since time zero (which is like the beginning of 1973 or some other arbitrary date). This means that time() - old_time is the number of seconds passed since old_time. | |||||||
| > > |
| |||||||
DGD Systemdump_state() | ||||||||
| Changed: | ||||||||
| < < |
'''Definition:''' void dump_state() | |||||||
| > > |
| |||||||
| Changed: | ||||||||
| < < |
'''Effect:''' Causes the system to create a state dump at the end of the current thread, to the file specified in the dgd config file. The old state dump will be copied to the same file name appended with ".old". | |||||||
| > > |
| |||||||
Fileeditor() | ||||||||
| Changed: | ||||||||
| < < |
'''Definition:''' string editor(varargs string command) | |||||||
| > > |
| |||||||
| Changed: | ||||||||
| < < |
'''Effect:''' Executes an editor command for the current object. This includes creating a new editor instance and associating it with the current object if necessary. This editor instance will remain active until issues a specific command to destroy it, or the associated object is destructed. | |||||||
| > > |
| |||||||
| Changed: | ||||||||
| < < |
'''Returns:''' Editor output as a string. | |||||||
| > > |
| |||||||
| Changed: | ||||||||
| < < |
'''Errors:''' If the number of editors is equal to the status()[ST_ETABSIZE] and a new instance needs to be created for this object, it will fail. You also cannot use the editor kfun in a user object. | |||||||
| > > |
| |||||||
get_dir() | ||||||||
| Changed: | ||||||||
| < < |
'''Definition:''' mixed **get_dir(string file) | |||||||
| > > |
| |||||||
| Changed: | ||||||||
| < < |
'''Returns:''' Information on the given file or directory. This is returned in an array with the following format: ({ ({file names}), ({file sizes}), ({file mod times}) }). If the file in the array is a directory, it will have a file size of -2. file can be a regular expression, in which case all files matching it will be returned. If no files match, then ({ ({}),({}),({})}) will be returned. Files will be sorted by name. | |||||||
| > > |
| |||||||
| Changed: | ||||||||
| < < |
'''Errors:''' Only up to status()[ST_ARRAYSIZE] files will be returned. If there are more files, then they will not be included. | |||||||
| > > |
| |||||||
Stringexplode() | ||||||||
| Changed: | ||||||||
| < < |
'''Definition:''' string *explode(string str, string separator) | |||||||
| > > |
| |||||||
| Changed: | ||||||||
| < < |
'''Returns:''' An array of strings, which are the parts of str seperated by the separator. | |||||||
| > > |
| |||||||
| Changed: | ||||||||
| < < |
'''Note:''' If a seperator is at the beginning or end of the string, there will not be a string segment exploded before it, meaning it will be lost in a implode(explode()) operation. | |||||||
| > > |
| |||||||
| Changed: | ||||||||
| < < |
'''Errors:''' If the size of the resulting array is greater than status()[ST_ARRAYSIZE], an error will occur. | |||||||
| > > |
| |||||||
implode() | ||||||||
| Changed: | ||||||||
| < < |
'''Definition:''' string implode(string *arr, string separator) | |||||||
| > > |
| |||||||
| Changed: | ||||||||
| < < |
'''Returns:''' The strings in arr appended together in order, seperated by the separator string. | |||||||
| > > |
| |||||||
| Changed: | ||||||||
| < < |
'''Errors:''' If the resulting string would be too long, an error will result. The argument array may contain only string values. | |||||||
| > > |
| |||||||
| -- ErwinHarte - 20 Jan 2005 | ||||||||
| Line: 1 to 1 | ||||||||
|---|---|---|---|---|---|---|---|---|
| Added: | ||||||||
| > > |
KfunsThese are functions provided by DGD to all objects. Some of these are masked by the KernelLib's auto object. Of course, if you are using another mudlib or are making your own then many of these may be masked.Mathacos()'''Definition:''' float acos(float x) '''Requires:''' -1 <= x <= 1 '''Returns:''' The arc cosine of x.asin()'''Definition:''' float asin(float x) '''Requires:''' -1 <= x <= 1 '''Returns:''' The arc sine of x.atan()'''Definition:''' float atan(float x) '''Returns:''' The arc tangent of x.atan2()'''Definition:''' float atan2(float y, float x) '''Returns:''' The arc tangent of y/x, determining the quadrant of the result from the signs of x and y.ceil()'''Definition:''' float ceil(float x) '''Returns:''' x rounded to the next highest integer (that is 0.4 -> 1.0, while -0.4 -> 0.0).cos()'''Definition:''' float cos(float x) '''Requires:''' That x not be too large (due to the way floats work, when x is greater than about 1e9, the accuracy of cos will be too low for it to be used reliably). '''Returns:''' The cosine of the argument.cohs()'''Definition:''' float cosh(float x) '''Errors:''' If the calculated result is too large, an error will result. '''Returns:''' The hyperbolic cosine of the argument.exp()'''Definition:''' float exp(float x) '''Returns:''' The exponential value of the given argument. '''Error:''' If the result is larger than a float can hold, it will generate and error.fabs()'''Definition:''' float fabs(float x) '''Returns:''' The absolute value of x.floor()'''Definition:''' float floor(float x) '''Returns:''' x rounded to the next lowest integer (that is 0.4 -> 0.0, while -0.4 -> -1.0).fmod()'''Definition:''' float fmod(float x, float y) '''Requires:''' y = 0.0 '''Returns:''' The value f, for which there exists an integer k such that k * y + f == x, f has the same sign of x, and the absolute value of f is less than the absolute value of y.frexp()'''Definition:''' mixed *frexp(float x) '''Returns:''' ({y, n}), such that y*2^n = x and y = 0.0 or 0.5 <= |y| < 1.0. If x = 0.0, the result will be (0.0, 0.0).Arrayallocate()'''Definition:''' mixed *allocate(int size) '''Requires:''' 0 <= size <= status()[ST_ARRAYSIZE] '''Returns:''' An array of the given size, with all elements initialised to nil.allocate_float()'''Definition:''' float *allocate_float(int size) '''Requires:''' 0 <= size <= status()[ST_ARRAYSIZE] '''Returns:''' An array of floats of the given size, with all elements initialised to 0.0.allocate_int()'''Definition:''' float *allocate_int(int size) '''Requires:''' 0 <= size <= status()[ST_ARRAYSIZE] '''Returns:''' An array of ints of the given size, with all elements initialised to 0.Connectionblock_input()'''Definition:''' void block_input(int flag) '''Effect:''' Will block or unblock all input from the user associated with the current object, on a non-zero or zero flag respectively.LPC objectcall_other()'''Definition:''' mixed call_other(mixed obj, string function, mixed args...) '''Requires:''' obj must be either a string giving the path of a compiled object or an object. '''Effect:''' Will call the given function in obj, passing the given arguments. The function will not be called if it is private, or if it is static and obj = this_object(). '''Returns:''' The result of the called function or nil if the function doesn't exist or cannot be called with call_other(). '''Note:''' The -> operator is shorthand for this function. obj->function(arg1, arg2) is equivalent to call_other(obj, "function", arg1, arg2).call_out()'''Definition:''' int call_out(string function, mixed delay, mixed args...) '''Requires:''' Delay must either be an integer >= 0, or a float >= 0.0 and <= 60.0. Also, the number of existing callouts is less than the value of ST_COTABSIZE in the array returned by status(). '''Effect:''' Will call the function on this object after the delay has passed, with the arguments. '''Returns:''' The call_out handle (reference). '''Note:''' If the maximum number of callouts is set to zero, call_out() will be ignored with no error.clone_object()'''Definition:''' object clone_object(object master) '''Requires:''' That the master object must not itself be a clone. '''Effects:''' Creates a clone of the master object with a unique name ("my_object#1234" for instance). The create(int clone) function will be called on the new object immediately, where "clone" is the number of the clone (1234 in this case). '''Returns:''' The new object.compile_object()'''Definition:''' object compile_object(string file) '''Requires:''' That if the object already exists, that it not be inherited by anything. file must give the full path of the file, including the extension (".c"). '''Effects:''' Creates an object whose name will be the file argument. ("my_object#1234" for instance). The create(int clone) function will be called on the new object immediately, where "clone" is the number of the clone (1234 in this case). If the file already exists, then at the end of the thread all clones will be updated. Any existing variables will be kept if the new master object also has those variables and they are the same type - otherwise they will be lost. '''Errors:''' Compilation errors are reported to the driver, and a runtime error will occur as will if compilation fails. '''Returns:''' The new object.destruct_object()'''Definition:''' void destruct_object(object obj) '''Effects:''' Destroys obj. If the caller is obj itself, it will be destroyed as soon as execution leaves it. If the last reference to a master object is removed, remove_program(objname) will be called on the driver. '''Errors:''' If an object destructs itself, avoid doing anything after the call to destruct - in particular, call_other will prevoke an error. Basically, try to fast-track your way out of the object as quickly as possible.find_object()'''Definition:''' object find_object(string obj) '''Returns:''' The object whose path is obj, if there is one. Otherwise, nil.function_object()'''Definition:''' string function_object(string function, object obj) '''Returns:''' The name of the class which obj inherits the function from (could be the name of obj), or nil if the function doesn't exist or is not callable with call_other().Runtimecall_trace()'''Definition:''' mixed **call_trace() '''Returns:''' An array representing the stack of the current thread. That is to say, every element of the array represents the position of the thread within a function. Each element of the array is in the following format: ({ objname, progname, function, line, extern, arg1, ..., argn }), where:
error()'''Description:''' void error(string errormessage) '''Effect:''' Causes an error, which will stop execution unless caught.Encryption/Decryption and Error Detectioncrypt()'''Definition:''' string crypt(string passwd, varargs string salt) '''Returns:''' An encrypted version of the string. Without the salt, it will be basically random. They way to use this as follows - first you take the raw form of the password, and run it though crypt to get an encrypted version. Afterwards, when you want to check a string to see if it is the password, run it though crypt using the encrypted version of the password as the salt. If the result is equal to the encrypted password, then they are the same. '''Note:''' Only the first 8 characters of the passwd and the first 2 characters of the salt are significant.hash_crc16()'''Definition:''' int hash_crc16(string str, string extra...) '''Returns:''' Something. Um, perhaps someone can explain what this is, and a typical use for it?hash_md5()'''Definition:''' string hash_md5(string str, string extra...) '''Returns:''' Something. Used for error detection?Timectime()'''Definition:''' string ctime(int time) '''Returns:''' The string representation of time (as returned by time()), in the format: "Tue Aug 3 14:40:18 1993".time()'''Definition:''' int time() '''Returns:''' The current time as an int. '''Note:''' Persumably it returns the number of seconds since time zero (which is like the beginning of 1973 or some other arbitrary date). This means that time() - old_time is the number of seconds passed since old_time.DGD Systemdump_state()'''Definition:''' void dump_state() '''Effect:''' Causes the system to create a state dump at the end of the current thread, to the file specified in the dgd config file. The old state dump will be copied to the same file name appended with ".old".Fileeditor()'''Definition:''' string editor(varargs string command) '''Effect:''' Executes an editor command for the current object. This includes creating a new editor instance and associating it with the current object if necessary. This editor instance will remain active until issues a specific command to destroy it, or the associated object is destructed. '''Returns:''' Editor output as a string. '''Errors:''' If the number of editors is equal to the status()[ST_ETABSIZE] and a new instance needs to be created for this object, it will fail. You also cannot use the editor kfun in a user object.get_dir()'''Definition:''' mixed **get_dir(string file) '''Returns:''' Information on the given file or directory. This is returned in an array with the following format: ({ ({file names}), ({file sizes}), ({file mod times}) }). If the file in the array is a directory, it will have a file size of -2. file can be a regular expression, in which case all files matching it will be returned. If no files match, then ({ ({}),({}),({})}) will be returned. Files will be sorted by name. '''Errors:''' Only up to status()[ST_ARRAYSIZE] files will be returned. If there are more files, then they will not be included.Stringexplode()'''Definition:''' string *explode(string str, string separator) '''Returns:''' An array of strings, which are the parts of str seperated by the separator. '''Note:''' If a seperator is at the beginning or end of the string, there will not be a string segment exploded before it, meaning it will be lost in a implode(explode()) operation. '''Errors:''' If the size of the resulting array is greater than status()[ST_ARRAYSIZE], an error will occur.implode()'''Definition:''' string implode(string *arr, string separator) '''Returns:''' The strings in arr appended together in order, seperated by the separator string. '''Errors:''' If the resulting string would be too long, an error will result. The argument array may contain only string values. -- ErwinHarte - 20 Jan 2005 | |||||||