From 400a9ab0ddc6c28e541d25fac96dd2fd8f825a18 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fredrik=20H=C3=BCbinette=20=28Hubbe=29?= <hubbe@hubbe.net> Date: Sat, 10 Feb 1996 21:54:19 +0100 Subject: [PATCH] fixed (to work with BMML) Rev: doc/builtin/aggregate_mapping:1.3 Rev: doc/builtin/arrayp:1.3 Rev: doc/builtin/backtrace:1.2 Rev: doc/builtin/call_function:1.2 Rev: doc/builtin/call_out_info:1.2 Rev: doc/builtin/combine_path:1.2 Rev: doc/builtin/crypt:1.2 Rev: doc/builtin/floatp:1.3 Rev: doc/builtin/functionp:1.3 Rev: doc/builtin/intp:1.3 Rev: doc/builtin/kill:1.2 Rev: doc/builtin/listp:1.3 Rev: doc/builtin/mappingp:1.3 Rev: doc/builtin/object_program:1.3 Rev: doc/builtin/objectp:1.3 Rev: doc/builtin/programp:1.3 Rev: doc/builtin/replace:1.3 Rev: doc/builtin/sscanf:1.3 Rev: doc/builtin/stringp:1.3 Rev: doc/operators/addition:1.2 Rev: doc/simulated/PI:1.3 Rev: doc/simulated/capitalize:1.3 Rev: doc/simulated/file_size:1.3 Rev: doc/simulated/filter_array:1.2 Rev: doc/simulated/get_function:1.2 Rev: doc/simulated/l_sizeof:1.2 Rev: doc/simulated/m_indices:1.2 Rev: doc/simulated/m_sizeof:1.2 Rev: doc/simulated/m_values:1.2 Rev: doc/simulated/map_array:1.2 Rev: doc/simulated/master:1.2 Rev: doc/simulated/member_array:1.2 Rev: doc/simulated/mklist:1.2 Rev: doc/simulated/read_bytes:1.2 Rev: doc/simulated/regexp:1.2 Rev: doc/simulated/search_array:1.2 Rev: doc/simulated/sort_array:1.3 Rev: doc/simulated/spawn:1.2 Rev: doc/simulated/strlen:1.2 Rev: doc/simulated/strstr:1.2 Rev: doc/simulated/sum_arrays:1.2 Rev: doc/simulated/this_function:1.3 Rev: doc/simulated/write_file:1.2 Rev: doc/types/array:1.3 Rev: doc/types/float:1.2 Rev: doc/types/function:1.2 Rev: doc/types/int:1.2 Rev: doc/types/list:1.2 Rev: doc/types/mapping:1.2 Rev: doc/types/object:1.2 Rev: doc/types/program:1.2 Rev: doc/types/string:1.2 --- doc/builtin/aggregate_mapping | 2 +- doc/builtin/arrayp | 4 +-- doc/builtin/backtrace | 6 ++-- doc/builtin/call_function | 3 ++ doc/builtin/call_out_info | 12 ++++---- doc/builtin/combine_path | 5 ++-- doc/builtin/crypt | 8 +++-- doc/builtin/floatp | 2 +- doc/builtin/functionp | 2 +- doc/builtin/intp | 2 +- doc/builtin/kill | 56 +++++++++++++++++------------------ doc/builtin/listp | 2 +- doc/builtin/mappingp | 2 +- doc/builtin/object_program | 2 +- doc/builtin/objectp | 2 +- doc/builtin/programp | 2 +- doc/builtin/replace | 11 ++++--- doc/builtin/sscanf | 18 ++++++----- doc/builtin/stringp | 2 +- doc/operators/addition | 4 +-- doc/simulated/PI | 3 ++ doc/simulated/capitalize | 3 ++ doc/simulated/file_size | 3 ++ doc/simulated/filter_array | 3 ++ doc/simulated/get_function | 3 ++ doc/simulated/l_sizeof | 3 ++ doc/simulated/m_indices | 3 ++ doc/simulated/m_sizeof | 3 ++ doc/simulated/m_values | 3 ++ doc/simulated/map_array | 3 ++ doc/simulated/master | 3 ++ doc/simulated/member_array | 3 ++ doc/simulated/mklist | 3 ++ doc/simulated/read_bytes | 3 ++ doc/simulated/regexp | 3 ++ doc/simulated/search_array | 3 ++ doc/simulated/sort_array | 3 ++ doc/simulated/spawn | 4 +-- doc/simulated/strlen | 3 ++ doc/simulated/strstr | 3 ++ doc/simulated/sum_arrays | 17 ++++++----- doc/simulated/this_function | 3 ++ doc/simulated/write_file | 3 ++ doc/types/array | 45 +++++++++++++++------------- doc/types/float | 29 ++++++++++-------- doc/types/function | 3 ++ doc/types/int | 37 ++++++++++++----------- doc/types/list | 41 +++++++++++++------------ doc/types/mapping | 49 ++++++++++++++++-------------- doc/types/object | 17 ++++++----- doc/types/program | 3 ++ doc/types/string | 28 ++++++++++-------- 52 files changed, 295 insertions(+), 188 deletions(-) diff --git a/doc/builtin/aggregate_mapping b/doc/builtin/aggregate_mapping index 1526e41be3..498e6616da 100644 --- a/doc/builtin/aggregate_mapping +++ b/doc/builtin/aggregate_mapping @@ -4,7 +4,7 @@ NAME SYNTAX mapping aggregate_mapping(mixed ... elems); or - (< key1:val1, key2:val2, ... >) + ([ key1:val1, key2:val2, ... ]) DESCRIPTION Groups the arguments together two and two to key-index pairs and diff --git a/doc/builtin/arrayp b/doc/builtin/arrayp index c6b844e20d..32c691eb54 100644 --- a/doc/builtin/arrayp +++ b/doc/builtin/arrayp @@ -11,5 +11,5 @@ KEYWORDS array SEE ALSO - allocate, intp, programp, floatp, stringp, objectp, regexpp, - mappingp, listp, functionp + allocate, intp, programp, floatp, stringp, objectp, mappingp, + listp, functionp diff --git a/doc/builtin/backtrace b/doc/builtin/backtrace index 3d421acc48..ce824d420d 100644 --- a/doc/builtin/backtrace +++ b/doc/builtin/backtrace @@ -10,9 +10,9 @@ DESCRIPTION in the stack. Each entry has this format: ({ - file, /* a string with the filename if known, else zero */ - function, /* The function-pointer to the called function */ - line, /* an integer containing the line if known, else zero */ + file, /* a string with the filename if known, else zero */ + function, /* The function-pointer to the called function */ + line, /* an integer containing the line if known, else zero */ }) The current call frame will be last in the array, and the one above diff --git a/doc/builtin/call_function b/doc/builtin/call_function index fb4eafb870..0af1d5b98a 100644 --- a/doc/builtin/call_function +++ b/doc/builtin/call_function @@ -12,5 +12,8 @@ DESCRIPTION you will never have to write call_function(), because you will use the second syntax instead. +KEYWORDS + function + SEE ALSO backtrace, get_function diff --git a/doc/builtin/call_out_info b/doc/builtin/call_out_info index c3399fe8ae..1b20ed3962 100644 --- a/doc/builtin/call_out_info +++ b/doc/builtin/call_out_info @@ -10,12 +10,12 @@ DESCRIPTION contains an array that looks like this: ({ - time_left, /* an int */ - caller, /* the object that made the call out */ - function, /* the function to be called */ - arg1, /* the first argument, if any */ - arg2, /* the second argument, if any */ - ... /* and so on... */ + time_left, /* an int */ + caller, /* the object that made the call out */ + function, /* the function to be called */ + arg1, /* the first argument, if any */ + arg2, /* the second argument, if any */ + ... /* and so on... */ }) SEE ALSO diff --git a/doc/builtin/combine_path b/doc/builtin/combine_path index 84cd9cb5b3..49043c3c7a 100644 --- a/doc/builtin/combine_path +++ b/doc/builtin/combine_path @@ -17,7 +17,8 @@ EXAMPLES > combine_path("/foo/bar","./sune.c"); Result: /foo/bar/sune.c +KEYWORDS + file + SEE ALSO getcwd - - \ No newline at end of file diff --git a/doc/builtin/crypt b/doc/builtin/crypt index d4e0e5b68d..8add859493 100644 --- a/doc/builtin/crypt +++ b/doc/builtin/crypt @@ -16,8 +16,10 @@ DESCRIPTION EXAMPLES To crypt a password use: - crypted_password = crypt(typed_password); + crypted_password = crypt(typed_password); To see if the same password was used again use: - matched = crypt(typed_password, crypted_password); + matched = crypt(typed_password, crypted_password); - \ No newline at end of file + +KEYWORDS + string diff --git a/doc/builtin/floatp b/doc/builtin/floatp index 4dfdab9df7..da740e9e4d 100644 --- a/doc/builtin/floatp +++ b/doc/builtin/floatp @@ -11,5 +11,5 @@ KEYWORDS float SEE ALSO - intp, programp, arrayp, stringp, objectp, regexpp, + intp, programp, arrayp, stringp, objectp, mappingp, listp, functionp diff --git a/doc/builtin/functionp b/doc/builtin/functionp index b6996bfe70..abb23b36ef 100644 --- a/doc/builtin/functionp +++ b/doc/builtin/functionp @@ -11,5 +11,5 @@ KEYWORDS function SEE ALSO - intp, programp, arrayp, stringp, objectp, regexpp, + intp, programp, arrayp, stringp, objectp, mappingp, listp, floatp diff --git a/doc/builtin/intp b/doc/builtin/intp index e04eeeb390..cbcd171065 100644 --- a/doc/builtin/intp +++ b/doc/builtin/intp @@ -11,5 +11,5 @@ KEYWORDS int SEE ALSO - arrayp, programp, floatp, stringp, objectp, regexpp, + arrayp, programp, floatp, stringp, objectp, mappingp, listp, functionp diff --git a/doc/builtin/kill b/doc/builtin/kill index ad0dc868a4..25588cfe3c 100644 --- a/doc/builtin/kill +++ b/doc/builtin/kill @@ -10,34 +10,34 @@ DESCRIPTION Some signals and their supposed purpose: - SIGHUP Hangup, sent to process when user logs out - SIGINT Interrupt, normally sent by ctrl-c - SIGQUIT Quit, sent by ctrl-\ - SIGILL Illegal instruction - SIGTRAP Trap, mostly used by debuggers - SIGABRT Aborts process, can be caught, used by uLPC whenever something - goes seriously wrong. - SIGBUS Bus error - SIGFPE Floating point error (such as division by zero) - SIGKILL Really kill a process, cannot be caught - SIGUSR1 Signal reserved for whatever you want to use it for. - SIGSEGV Segmentation fault, caused by accessing memory where you - shouldn't. Should never happen to uLPC. - SIGUSR2 Signal reserved for whatever you want to use it for. - SIGALRM Signal used for timer interrupts. - SIGTERM Termination signal - SIGSTKFLT Stack fault - SIGCHLD Child process died - SIGCONT Continue suspended - SIGSTOP Stop process - SIGSTP Suspend process - SIGTTIN tty input for background process - SIGTTOU tty output for background process - SIGXCPU Out of cpu - SIGXFSZ File size limit exceeded - SIGPROF Profile trap - SIGWINCH Window change signal - + SIGHUP Hangup, sent to process when user logs out + SIGINT Interrupt, normally sent by ctrl-c + SIGQUIT Quit, sent by ctrl-\ + SIGILL Illegal instruction + SIGTRAP Trap, mostly used by debuggers + SIGABRT Aborts process, can be caught, used by uLPC whenever something + goes seriously wrong. + SIGBUS Bus error + SIGFPE Floating point error (such as division by zero) + SIGKILL Really kill a process, cannot be caught + SIGUSR1 Signal reserved for whatever you want to use it for. + SIGSEGV Segmentation fault, caused by accessing memory where you + shouldn't. Should never happen to uLPC. + SIGUSR2 Signal reserved for whatever you want to use it for. + SIGALRM Signal used for timer interrupts. + SIGTERM Termination signal + SIGSTKFLT Stack fault + SIGCHLD Child process died + SIGCONT Continue suspended + SIGSTOP Stop process + SIGSTP Suspend process + SIGTTIN tty input for background process + SIGTTOU tty output for background process + SIGXCPU Out of cpu + SIGXFSZ File size limit exceeded + SIGPROF Profile trap + SIGWINCH Window change signal + Note that you have to use signame to translate the name of a signal to it's number. diff --git a/doc/builtin/listp b/doc/builtin/listp index 25fdf57ced..16c92365f4 100644 --- a/doc/builtin/listp +++ b/doc/builtin/listp @@ -11,5 +11,5 @@ KEYWORDS list SEE ALSO - intp, programp, arrayp, stringp, objectp, regexpp, + intp, programp, arrayp, stringp, objectp, mappingp, floatp, functionp diff --git a/doc/builtin/mappingp b/doc/builtin/mappingp index 9eaa3b0e91..6247155ce8 100644 --- a/doc/builtin/mappingp +++ b/doc/builtin/mappingp @@ -11,5 +11,5 @@ KEYWORDS mapping SEE ALSO - intp, programp, arrayp, stringp, objectp, regexpp, + intp, programp, arrayp, stringp, objectp, listp, floatp, functionp diff --git a/doc/builtin/object_program b/doc/builtin/object_program index 028e16e896..88f634f560 100644 --- a/doc/builtin/object_program +++ b/doc/builtin/object_program @@ -7,7 +7,7 @@ SYNTAX DESCRIPTION This function returns the program from which o was cloned. -KEYWORD +KEYWORDS object SEE ALSO diff --git a/doc/builtin/objectp b/doc/builtin/objectp index d31cd55bc6..ee74c51b9f 100644 --- a/doc/builtin/objectp +++ b/doc/builtin/objectp @@ -11,5 +11,5 @@ KEYWORDS object SEE ALSO - intp, programp, floatp, stringp, arrayp, regexpp, + intp, programp, floatp, stringp, arrayp, mappingp, listp, functionp diff --git a/doc/builtin/programp b/doc/builtin/programp index 16304dbca7..83757aee93 100644 --- a/doc/builtin/programp +++ b/doc/builtin/programp @@ -11,5 +11,5 @@ KEYWORDS program SEE ALSO - intp, listp, arrayp, stringp, objectp, regexpp, + intp, listp, arrayp, stringp, objectp, mappingp, floatp, functionp diff --git a/doc/builtin/replace b/doc/builtin/replace index ea479ae070..32d2e1ed8a 100644 --- a/doc/builtin/replace +++ b/doc/builtin/replace @@ -14,17 +14,20 @@ DESCRIPTION This function can do several kinds replacement operations, the different syntaxes do different things as follow: - 1) string replace(string s, string from, string to); + string replace(string s, string from, string to); + When given strings as second and third argument, a copy of s with every occurance of 'from' return 'to'. - 2) string replace(string s, string *from, string *to); + string replace(string s, string *from, string *to); + When given arrays of strings as second and third argument, every occurance of from[0] in s is replaced by to[0], from[1] is replaced by to[1] and so on... - 3) array replace(array a, mixed from, mixed to); - 4) mapping replace(mapping a, mixed from, mixed to); + array replace(array a, mixed from, mixed to); + mapping replace(mapping a, mixed from, mixed to); + When the first argument is an array or mapping, the values in a are searched for values equal to from, which are replaced by to destructively. diff --git a/doc/builtin/sscanf b/doc/builtin/sscanf index af6bd6e990..22526c5210 100644 --- a/doc/builtin/sscanf +++ b/doc/builtin/sscanf @@ -9,13 +9,17 @@ DESCRIPTION separated by "%d,%s,%c and %f. Every % corresponds to one of var1, var2... - %d gives an integer - %f gives a float - %c matches one char but returns an integer - %s gives a string - %[set] matches a string containing a given set of characters. - (thos given inside the brackets) %[^set] means any character - ecept those inside brackets. %[0-9H] means any number or 'H'. + %d gives an integer + %o gives an octal integer + %x gives a hexadecimal integer + %D gives an integer that is either octal (leading zero), + hexadecimal (leading 0x) or decimal. + %f gives a float + %c matches one char and returns it as an integer + %s gives a string + %[set] matches a string containing a given set of characters. + (thos given inside the brackets) %[^set] means any character + ecept those inside brackets. %[0-9H] means any number or 'H'. If a * is put between the percent and the operator, the operator will not only match it's argument, not assign any variables. diff --git a/doc/builtin/stringp b/doc/builtin/stringp index 15fa5d0eee..b153861faf 100644 --- a/doc/builtin/stringp +++ b/doc/builtin/stringp @@ -11,5 +11,5 @@ KEYWORDS string SEE ALSO - intp, listp, arrayp, programp, objectp, regexpp, + intp, listp, arrayp, programp, objectp, mappingp, floatp, functionp diff --git a/doc/operators/addition b/doc/operators/addition index 984838a522..f7ab8da026 100644 --- a/doc/operators/addition +++ b/doc/operators/addition @@ -15,8 +15,8 @@ DESCRIPTION the number is converted to a printable string first. EXAMPLES - "a"+10 returns "a10" - 10+20 returns 30 + "a"+10 returns "a10" + 10+20 returns 30 ({1})+({2}) returns ({1,2}) (<1>)+(<1>) returns (<1,1>) diff --git a/doc/simulated/PI b/doc/simulated/PI index 4723df2dc2..7326afddff 100644 --- a/doc/simulated/PI +++ b/doc/simulated/PI @@ -6,3 +6,6 @@ SYNTAX DESCRIPTION This is not a function, it is a constant added by simulate.lpc. + +KEYWORDS + float diff --git a/doc/simulated/capitalize b/doc/simulated/capitalize index afcd237894..fd6f8bb120 100644 --- a/doc/simulated/capitalize +++ b/doc/simulated/capitalize @@ -8,5 +8,8 @@ DESCRIPTION Convert the first character in str to upper case, and return the new string. +KEYWORDS + string + SEE ALSO builtin/lower_case, builtin/upper_case diff --git a/doc/simulated/file_size b/doc/simulated/file_size index 05a07d0ea2..650918d139 100644 --- a/doc/simulated/file_size +++ b/doc/simulated/file_size @@ -9,5 +9,8 @@ DESCRIPTION does not exist, or that it is not readable by you. Size -2 indicates that it is a directory. +KEYWORDS + file + SEE ALSO write_file, read_bytes diff --git a/doc/simulated/filter_array b/doc/simulated/filter_array index bda384c9cd..4ad54ca6e1 100644 --- a/doc/simulated/filter_array +++ b/doc/simulated/filter_array @@ -21,5 +21,8 @@ DESCRIPTION Filter array calls all functionpointers in the array arr, and return all that returned true. +KEYWORDS + array + SEE ALSO sum_arrays, map_array diff --git a/doc/simulated/get_function b/doc/simulated/get_function index 581ec53314..a1da375025 100644 --- a/doc/simulated/get_function +++ b/doc/simulated/get_function @@ -6,3 +6,6 @@ SYNTAX DESCRIPTION Defined as: return o[name]; + +KEYWORDS + function diff --git a/doc/simulated/l_sizeof b/doc/simulated/l_sizeof index d8daf84a53..002009287f 100644 --- a/doc/simulated/l_sizeof +++ b/doc/simulated/l_sizeof @@ -7,5 +7,8 @@ SYNTAX DESCRIPTION This function is equal to builtin/sizeof. +KEYWORDS + list + SEE ALSO builtin/sizeof \ No newline at end of file diff --git a/doc/simulated/m_indices b/doc/simulated/m_indices index 657023deb8..01183e045f 100644 --- a/doc/simulated/m_indices +++ b/doc/simulated/m_indices @@ -7,5 +7,8 @@ SYNTAX DESCRIPTION This function is equal to builtin/indices +KEYWORDS + mapping + SEE ALSO builtin/indices diff --git a/doc/simulated/m_sizeof b/doc/simulated/m_sizeof index 63db3ea12e..a716131e34 100644 --- a/doc/simulated/m_sizeof +++ b/doc/simulated/m_sizeof @@ -7,5 +7,8 @@ SYNTAX DESCRIPTION This function is equal to builtin/sizeof. +KEYWORDS + mapping + SEE ALSO builtin/sizeof \ No newline at end of file diff --git a/doc/simulated/m_values b/doc/simulated/m_values index 95175ccd02..6624758740 100644 --- a/doc/simulated/m_values +++ b/doc/simulated/m_values @@ -7,5 +7,8 @@ SYNTAX DESCRIPTION This function is equal to builtin/values +KEYWORDS + mapping + SEE ALSO builtin/values diff --git a/doc/simulated/map_array b/doc/simulated/map_array index be8fe70b5c..a4c1987289 100644 --- a/doc/simulated/map_array +++ b/doc/simulated/map_array @@ -21,5 +21,8 @@ DESCRIPTION Map array calls the functions in the array arr: arr[x]=arr[x]->fun(@ args); +KEYWORDS + array + SEE ALSO sum_arrays, filter_array diff --git a/doc/simulated/master b/doc/simulated/master index f0594d1aa6..7015cbfaee 100644 --- a/doc/simulated/master +++ b/doc/simulated/master @@ -6,3 +6,6 @@ SYNTAX DESCRIPTION Master is added by the master object to make it easier to access it. + +KEYWORDS + object diff --git a/doc/simulated/member_array b/doc/simulated/member_array index 0abc1df604..c336f183f9 100644 --- a/doc/simulated/member_array +++ b/doc/simulated/member_array @@ -7,3 +7,6 @@ SYNTAX DESCRIPTION Returns the index of the first occurence of item in array arr. If not found, then -1 is returned. + +KEYWORDS + array diff --git a/doc/simulated/mklist b/doc/simulated/mklist index 2629ce1573..836e52c72e 100644 --- a/doc/simulated/mklist +++ b/doc/simulated/mklist @@ -15,5 +15,8 @@ EXAMPLE 3 >) +KEYWORDS + list + SEE ALSO builtin/aggregate_list \ No newline at end of file diff --git a/doc/simulated/read_bytes b/doc/simulated/read_bytes index 95e5e32ada..7f042ad694 100644 --- a/doc/simulated/read_bytes +++ b/doc/simulated/read_bytes @@ -8,6 +8,9 @@ DESCRIPTION Read len number of bytes from file file staring at byte start and return it as a string. +KEYWORDS + file + SEE ALSO write_file diff --git a/doc/simulated/regexp b/doc/simulated/regexp index 05f14528ed..3d3ac3b8eb 100644 --- a/doc/simulated/regexp +++ b/doc/simulated/regexp @@ -7,5 +7,8 @@ SYNTAX DESCRIPTION Return those strings in arr that matches the regexp in reg. +KEYWORDS + string + SEE ALSO regexp/regexp diff --git a/doc/simulated/search_array b/doc/simulated/search_array index 98468d9533..8db3a37a92 100644 --- a/doc/simulated/search_array +++ b/doc/simulated/search_array @@ -13,5 +13,8 @@ DESCRIPTION first call that returned true instead or returning an array of the returned values. If no call returns true, -1 is returned. +KEYWORDS + array + SEE ALSO sum_arrays, filter_array, member_array diff --git a/doc/simulated/sort_array b/doc/simulated/sort_array index f50e9753c1..de6a6ea4f5 100644 --- a/doc/simulated/sort_array +++ b/doc/simulated/sort_array @@ -11,5 +11,8 @@ DESCRIPTION sent as 3rd, 4th etc. argument to fun. If fun is omitted, < is unsed instead. +KEYWORDS + array + SEE ALSO map_array, filter_array diff --git a/doc/simulated/spawn b/doc/simulated/spawn index c04ee827b7..231512d32d 100644 --- a/doc/simulated/spawn +++ b/doc/simulated/spawn @@ -17,6 +17,6 @@ DESCRIPTION should go. SEE ALSO - popen, files/fork, files/exec, files/files->pipe, - files/files->dup2 + popen, files/fork, files/exec, files/file->pipe, + files/file->dup2 diff --git a/doc/simulated/strlen b/doc/simulated/strlen index 905b996047..a9b0ba0704 100644 --- a/doc/simulated/strlen +++ b/doc/simulated/strlen @@ -7,5 +7,8 @@ SYNTAX DESCRIPTION This function is equal to builtin/sizeof. +KEYWORDS + string + SEE ALSO builtin/sizeof \ No newline at end of file diff --git a/doc/simulated/strstr b/doc/simulated/strstr index 08bd1463fa..29d12b5d5d 100644 --- a/doc/simulated/strstr +++ b/doc/simulated/strstr @@ -8,5 +8,8 @@ DESCRIPTION Return the position of str2 in str1, if str2 can't be found in str1 -1 is returned. +KEYWORDS + string + SEE ALSO builtin/sscanf, builtin/explode diff --git a/doc/simulated/sum_arrays b/doc/simulated/sum_arrays index 7c9bfb881e..414f09d2f1 100644 --- a/doc/simulated/sum_arrays +++ b/doc/simulated/sum_arrays @@ -7,18 +7,21 @@ SYNTAX DESCRIPTION Works like this: - mixed *sum_arrays(function fun,mixed *arr1,...) - { - int e; + mixed *sum_arrays(function fun,mixed *arr1,...) + { + int e; mixed *res=allocate(sizeof(arr1)); - for(e=0;e<sizeof(arr1);e++) - { + for(e=0;e<sizeof(arr1);e++) + { res[e]=fun(arr1[e],arr2[e],...); - } + } return res; - } + } Simple ehh? +KEYWORDS + array + SEE ALSO map_array, filter_array, search_array diff --git a/doc/simulated/this_function b/doc/simulated/this_function index ee659e9545..d1bdf36935 100644 --- a/doc/simulated/this_function +++ b/doc/simulated/this_function @@ -8,6 +8,9 @@ DESCRIPTION Returns a functionpointer to the current function, useful for making recursive lambda-functions. +KEYWORDS + function + SEE ALSO builtin/get_function, builtin/function_name, builtin/function_object, builtin/backtrace diff --git a/doc/simulated/write_file b/doc/simulated/write_file index 04e7c1fa84..174e7084ab 100644 --- a/doc/simulated/write_file +++ b/doc/simulated/write_file @@ -7,5 +7,8 @@ SYNTAX DESCRIPTION Append the string str onto the file file. Returns number of bytes written. +KEYWORDS + file + SEE ALSO read_file diff --git a/doc/types/array b/doc/types/array index 5576582658..2bbbf51f37 100644 --- a/doc/types/array +++ b/doc/types/array @@ -20,27 +20,30 @@ DESCRIPTION Here follows a list of operators that applies to arrays: In this list a and b is used to represent an array expression: - a + b : summation ( ({1}) + ({2}) returns ({1,2}) ) - a - b : subtraction, returns a copy of a with all values that are - present in b removed, ( ({1, 2, 3}) - ({2}) returns ({1,3}) ) - a & b : intersection, return an array with all values that are - present in both a and b - a | b : union, return an array with all values that are present in - a or b, differs from summation in that values that are - present in both a and b are only returned once. - a ^ b : xor, return an array with all values that are present in - a or b but not in both. - a * c : multiplication (c is a string) same thing as implode(a,c) - a == b : returns 1 if a is the same array as b, same size and values - is not enough. - a != b : returns 0 if a is the same array as b, same size and values - is not enough. - ! a : boolean not, returns 0 - a[c] : indexing, returns element c in the array (c is an int) - a[c]=d : setting, sets element c in the array to d (c is an int) - a[c..d]: range (c & d are ints) returns an array containing a pice of - the array a. The piece starts at element c and ends (and - includes) element d. + a + b summation ( ({1}) + ({2}) returns ({1,2}) ) + a - b subtraction, returns a copy of a with all values that are + present in b removed, ( ({1, 2, 3}) - ({2}) returns ({1,3}) ) + a & b intersection, return an array with all values that are + present in both a and b + a | b union, return an array with all values that are present in + a or b, differs from summation in that values that are + present in both a and b are only returned once. + a ^ b xor, return an array with all values that are present in + a or b but not in both. + a * c multiplication (c is a string) same thing as implode(a,c) + a == b returns 1 if a is the same array as b, same size and values + is not enough. + a != b returns 0 if a is the same array as b, same size and values + is not enough. + ! a boolean not, returns 0 + a[c] indexing, returns element c in the array (c is an int) + a[c]=d setting, sets element c in the array to d (c is an int) + a[c..d] range (c & d are ints) returns an array containing a pice of + the array a. The piece starts at element c and ends (and + includes) element d. + +KEYWORDS + type SEE ALSO mapping, list, builtin/allocate, builtin/sizeof, builtin/values diff --git a/doc/types/float b/doc/types/float index 4b27d692e4..ca52ca30af 100644 --- a/doc/types/float +++ b/doc/types/float @@ -13,22 +13,25 @@ DESCRIPTION A list of operators that applies to floats follows: In this list a and b is used to represent a float expression: - a + b : summation - a - b : subtraction - a * b : multiplication - a / b : integer division - a % b : modulo ( same thing as a - floor( a / b ) * b ) - - a : negation - a == b : return 1 if a is equal to b, 0 otherwise - a != b : return 0 if a is equal to b, 1 otherwise - a < b : returns 1 if a is lesser than b, 0 otherwise - a <= b : returns 1 if a is lesser or equal to b, 0 otherwise - a > b : returns 1 if a is greater than b, 0 otherwise - a >= b : returns 1 if a is greater or equal to b, 0 otherwise + a + b summation + a - b subtraction + a * b multiplication + a / b integer division + a % b modulo ( same thing as a - floor( a / b ) * b ) + - a negation + a == b return 1 if a is equal to b, 0 otherwise + a != b return 0 if a is equal to b, 1 otherwise + a < b returns 1 if a is lesser than b, 0 otherwise + a <= b returns 1 if a is lesser or equal to b, 0 otherwise + a > b returns 1 if a is greater than b, 0 otherwise + a >= b returns 1 if a is greater or equal to b, 0 otherwise NOTA BENE floats and ints cannot be used together, they have to be cast to the same type first. +KEYWORDS + type + SEE ALSO - float, modules/math + math/sin, math/cos, math/tan, math/sqrt diff --git a/doc/types/function b/doc/types/function index d0db01411f..ad60ad37a6 100644 --- a/doc/types/function +++ b/doc/types/function @@ -13,6 +13,9 @@ DESCRIPTION become 0. If you try to call a functionpointer that has is 0 then 0 will be returned. +KEYWORDS + type + SEE ALSO object, builtin/call_function, builtin/functionp, builtin/function_object, builtin/function_name diff --git a/doc/types/int b/doc/types/int index b4fa880200..e174c18023 100644 --- a/doc/types/int +++ b/doc/types/int @@ -14,23 +14,26 @@ DESCRIPTION In this list a and b is used to represent an integer expression: - a + b : summation - a - b : subtraction - a * b : multiplication - a / b : integer division - a % b : modulo ( same thing as a - ( a / b ) * b ) - a | b : bitwise or - a & b : bitwise and - a ^ b : bitwise xor - ! a : boolean not, returns 1 if a is zero 0 otherwise - ~ a : bitwise complement - - a : negation - a == b : return 1 if a is equal to b, 0 otherwise - a != b : return 0 if a is equal to b, 1 otherwise - a < b : returns 1 if a is lesser than b, 0 otherwise - a <= b : returns 1 if a is lesser or equal to b, 0 otherwise - a > b : returns 1 if a is greater than b, 0 otherwise - a >= b : returns 1 if a is greater or equal to b, 0 otherwise + a + b summation + a - b subtraction + a * b multiplication + a / b integer division + a % b modulo ( same thing as a - ( a / b ) * b ) + a | b bitwise or + a & b bitwise and + a ^ b bitwise xor + ! a boolean not, returns 1 if a is zero 0 otherwise + ~ a bitwise complement + - a negation + a == b return 1 if a is equal to b, 0 otherwise + a != b return 0 if a is equal to b, 1 otherwise + a < b returns 1 if a is lesser than b, 0 otherwise + a <= b returns 1 if a is lesser or equal to b, 0 otherwise + a > b returns 1 if a is greater than b, 0 otherwise + a >= b returns 1 if a is greater or equal to b, 0 otherwise + +KEYWORDS + type SEE ALSO float diff --git a/doc/types/list b/doc/types/list index ceee090925..b361d0915c 100644 --- a/doc/types/list +++ b/doc/types/list @@ -11,25 +11,28 @@ DESCRIPTION Here follows a list of operators that applies to lists: In this list a and b is used to represent a list expression: - a + b : summation ( (<1>) + (<2>) returns (<1,2>) ) - a - b : subtraction, returns a copy of a with all values that are - present in b removed. - a & b : intersection, return a list with all values that are - present in both a & b. - a | b : union, return a list with all values that are present in - a or b, differs from summation in that values that are - present in both a and b are only returned once. - a ^ b : xor, return a list with all indices that are present in - a or b but not in both. - a == b : returns 1 if a is the same list as b, same size and values - is not enough. - a != b : returns 1 if a is the same list as b, same size and values - is not enough. - ! a : boolean not, returns 0 - a[c] : indexing, returns 1 c is present in the list a. - a[c]=d : setting, if d is true, c is added to the list if it is not - present already. If d is false, it is removed if it is - present. + a + b summation ( (<1>) + (<2>) returns (<1,2>) ) + a - b subtraction, returns a copy of a with all values that are + present in b removed. + a & b intersection, return a list with all values that are + present in both a & b. + a | b union, return a list with all values that are present in + a or b, differs from summation in that values that are + present in both a and b are only returned once. + a ^ b xor, return a list with all indices that are present in + a or b but not in both. + a == b returns 1 if a is the same list as b, same size and values + is not enough. + a != b returns 1 if a is the same list as b, same size and values + is not enough. + ! a boolean not, returns 0 + a[c] indexing, returns 1 c is present in the list a. + a[c]=d setting, if d is true, c is added to the list if it is not + present already. If d is false, it is removed if it is + present. + +KEYWORDS + type SEE ALSO mapping, array, builtin/indices, builtin/sizeof diff --git a/doc/types/mapping b/doc/types/mapping index a4db94328f..f009414380 100644 --- a/doc/types/mapping +++ b/doc/types/mapping @@ -16,29 +16,32 @@ DESCRIPTION Here follows a list of operators that applies to mappings: In this list a and b is used to represent a mapping expression: - a + b : summation ( ([1:1]) + ([2:2,2:2]) returns ([1:1,2:2]) ) - a - b : subtraction, returns a copy of a with all pairs whos - index is present in b removed. - a & b : intersection, return a mapping with all indices that are - present in both a and b, if an index is present in both - a & b the data for that index will be taken from b. - a | b : union, return a mapping with all values that are present in - a or b, differs from summation in that values that are - present in both a and b are only returned once, as with - intersection, data will be taken from b when possible. - a ^ b : xor, return a mapping with all indices that are present in - a or b but not in both. - a == b : returns 1 if a is the same mapping as b, same size, indices - and values is not enough, 0 otherwise. - a != b : returns 0 if a is the same mapping as b, same size, indices - and values is not enough, 1 otherwise. - ! a : boolean not, returns 0 - a[c] : indexing, returns the value associated with the value c - in the mapping a. If there is no index c in the mapping - zero will be returned. (With zero type = 1) - a[c]=d : setting, this associates d with c in the mapping, the index - c will be added to the mapping automatically if it isn't - already there. + a + b summation ( ([1:1]) + ([2:2,2:2]) returns ([1:1,2:2]) ) + a - b subtraction, returns a copy of a with all pairs whos + index is present in b removed. + a & b intersection, return a mapping with all indices that are + resent in both a and b, if an index is present in both + a & b the data for that index will be taken from b. + a | b union, return a mapping with all values that are present in + a or b, differs from summation in that values that are + present in both a and b are only returned once, as with + intersection, data will be taken from b when possible. + a ^ b xor, return a mapping with all indices that are present in + a or b but not in both. + a == b returns 1 if a is the same mapping as b, same size, indices + and values is not enough, 0 otherwise. + a != b returns 0 if a is the same mapping as b, same size, indices + and values is not enough, 1 otherwise. + ! a boolean not, returns 0 + a[c] indexing, returns the value associated with the value c + in the mapping a. If there is no index c in the mapping + zero will be returned. (With zero type = 1) + a[c]=d setting, this associates d with c in the mapping, the index + c will be added to the mapping automatically if it isn't + already there. + +KEYWORDS + type SEE ALSO array, list, builtin/sizeof, builtin/indices, builtin/values diff --git a/doc/types/object b/doc/types/object index 7c3a1873c8..316e6c185c 100644 --- a/doc/types/object +++ b/doc/types/object @@ -10,13 +10,16 @@ DESCRIPTION In this list, o and o2 are used to represent object expressions, and s is a string expression: - o[s] : indexing, returns the identifier named s in the object o, - an identifier is a global variable or a function. - o[s]=c : This sets the global variable s int the object o to c, - if s is a function however, an error is produced. - o -> foo : same as o["foo"] - o == o2 : return 1 if o and o2 are the same object - o != o2 : return 0 if o and o2 are the same object + o[s] indexing, returns the identifier named s in the object o, + an identifier is a global variable or a function. + o[s]=c This sets the global variable s int the object o to c, + if s is a function however, an error is produced. + o->foo same as o["foo"] + o == o2 return 1 if o and o2 are the same object + o != o2 return 0 if o and o2 are the same object + +KEYWORDS + type SEE ALSO program, function, builtin/clone, builtin/destruct diff --git a/doc/types/program b/doc/types/program index e48520b314..b428dbcf85 100644 --- a/doc/types/program +++ b/doc/types/program @@ -8,6 +8,9 @@ DESCRIPTION arguments to clone() and the only operators that applies to programs are == and !=. +KEYWORDS + type + SEE ALSO object, function, builtin/compile_file, builtin/compile_string, builtin/clone diff --git a/doc/types/string b/doc/types/string index b69fb8053b..8074d27562 100644 --- a/doc/types/string +++ b/doc/types/string @@ -17,18 +17,22 @@ DESCRIPTION A list of operators that applies to strings follow: In this list a and b is used to represent a string expression: - a + b : summation ( "a"+"b" returns "ab") - a - b : subtraction ( same as replace(a,b,"") ) - a / b : division ( same thing as explode(a,b) ) - ! a : boolean not, returns 0 - - The following operators compare two string alphabetically: - a == b : return 1 if a is equal to b, 0 otherwise - a != b : return 0 if a is equal to b, 1 otherwise - a < b : returns 1 if a is lesser than b, 0 otherwise - a <= b : returns 1 if a is lesser or equal to b, 0 otherwise - a > b : returns 1 if a is greater than b, 0 otherwise - a >= b : returns 1 if a is greater or equal to b, 0 otherwise + a + b summation ( "a"+"b" returns "ab") + a - b subtraction ( same as replace(a,b,"") ) + a / b division ( same thing as explode(a,b) ) + ! a boolean not, returns 0 + + The following operators compare two string alphabetically: + + a == b return 1 if a is equal to b, 0 otherwise + a != b return 0 if a is equal to b, 1 otherwise + a < b returns 1 if a is lesser than b, 0 otherwise + a <= b returns 1 if a is lesser or equal to b, 0 otherwise + a > b returns 1 if a is greater than b, 0 otherwise + a >= b returns 1 if a is greater or equal to b, 0 otherwise + +KEYWORDS + type SEE ALSO builtin/indices, builtin/values, builtin/sscanf, builtin/sprintf, -- GitLab