Branch: Tag:

1996-09-22

1996-09-22 19:40:33 by Fredrik Hübinette (Hubbe) <hubbe@hubbe.net>

Pike

Rev: .cvsignore:1.1.1.1
Rev: README:1.1.1.1
Rev: bin/export.pike:1.1.1.1
Rev: bin/fixdepends.sh:1.1.1.1
Rev: bin/hilfe:1.1.1.1
Rev: bin/htmlify_docs.pike:1.1.1.1
Rev: bin/httpd.pike:1.1.1.1
Rev: bin/metatest:1.1.1.1
Rev: bin/mkpeep.pike:1.1.1.1
Rev: bin/rsif:1.1.1.1
Rev: doc/README:1.1.1.1
Rev: doc/builtin/_verify_internals:1.1.1.1
Rev: doc/builtin/add_constant:1.1.1.1
Rev: doc/builtin/aggregage_multiset:1.1.1.1
Rev: doc/builtin/aggregate:1.1.1.1
Rev: doc/builtin/aggregate_mapping:1.1.1.1
Rev: doc/builtin/alarm:1.1.1.1
Rev: doc/builtin/all_constants:1.1.1.1
Rev: doc/builtin/allocate:1.1.1.1
Rev: doc/builtin/arrayp:1.1.1.1
Rev: doc/builtin/backtrace:1.1.1.1
Rev: doc/builtin/call_function:1.1.1.1
Rev: doc/builtin/clone:1.1.1.1
Rev: doc/builtin/column:1.1.1.1
Rev: doc/builtin/combine_path:1.1.1.1
Rev: doc/builtin/compile_file:1.1.1.1
Rev: doc/builtin/compile_string:1.1.1.1
Rev: doc/builtin/copy_value:1.1.1.1
Rev: doc/builtin/crypt:1.1.1.1
Rev: doc/builtin/ctime:1.1.1.1
Rev: doc/builtin/destruct:1.1.1.1
Rev: doc/builtin/equal:1.1.1.1
Rev: doc/builtin/exit:1.1.1.1
Rev: doc/builtin/floatp:1.1.1.1
Rev: doc/builtin/function_name:1.1.1.1
Rev: doc/builtin/function_object:1.1.1.1
Rev: doc/builtin/functionp:1.1.1.1
Rev: doc/builtin/gc:1.1.1.1
Rev: doc/builtin/getpid:1.1.1.1
Rev: doc/builtin/glob:1.1.1.1
Rev: doc/builtin/hash:1.1.1.1
Rev: doc/builtin/indices:1.1.1.1
Rev: doc/builtin/intp:1.1.1.1
Rev: doc/builtin/kill:1.1.1.1
Rev: doc/builtin/localtime:1.1.1.1
Rev: doc/builtin/lower_case:1.1.1.1
Rev: doc/builtin/m_delete:1.1.1.1
Rev: doc/builtin/mappingp:1.1.1.1
Rev: doc/builtin/mkmapping:1.1.1.1
Rev: doc/builtin/multisetp:1.1.1.1
Rev: doc/builtin/next_object:1.1.1.1
Rev: doc/builtin/object_program:1.1.1.1
Rev: doc/builtin/objectp:1.1.1.1
Rev: doc/builtin/programp:1.1.1.1
Rev: doc/builtin/query_host_name:1.1.1.1
Rev: doc/builtin/query_num_arg:1.1.1.1
Rev: doc/builtin/random:1.1.1.1
Rev: doc/builtin/random_seed:1.1.1.1
Rev: doc/builtin/replace:1.1.1.1
Rev: doc/builtin/reverse:1.1.1.1
Rev: doc/builtin/rows:1.1.1.1
Rev: doc/builtin/rusage:1.1.1.1
Rev: doc/builtin/search:1.1.1.1
Rev: doc/builtin/signal:1.1.1.1
Rev: doc/builtin/signame:1.1.1.1
Rev: doc/builtin/signum:1.1.1.1
Rev: doc/builtin/sizeof:1.1.1.1
Rev: doc/builtin/sleep:1.1.1.1
Rev: doc/builtin/sort:1.1.1.1
Rev: doc/builtin/stringp:1.1.1.1
Rev: doc/builtin/this_object:1.1.1.1
Rev: doc/builtin/throw:1.1.1.1
Rev: doc/builtin/time:1.1.1.1
Rev: doc/builtin/trace:1.1.1.1
Rev: doc/builtin/ualarm:1.1.1.1
Rev: doc/builtin/upper_case:1.1.1.1
Rev: doc/builtin/values:1.1.1.1
Rev: doc/builtin/zero_type:1.1.1.1
Rev: doc/index.bmml:1.1.1.1
Rev: doc/manual/example1:1.1.1.1
Rev: doc/manual/example2:1.1.1.1
Rev: doc/manual/example3:1.1.1.1
Rev: doc/manual/tutorial:1.1.1.1
Rev: doc/operators/and:1.1.1.1
Rev: doc/operators/complement:1.1.1.1
Rev: doc/operators/divide:1.1.1.1
Rev: doc/operators/index:1.1.1.1
Rev: doc/operators/is_equal:1.1.1.1
Rev: doc/operators/is_greater_or_equal:1.1.1.1
Rev: doc/operators/is_greater_than:1.1.1.1
Rev: doc/operators/is_lesser_or_equal:1.1.1.1
Rev: doc/operators/is_lesser_than:1.1.1.1
Rev: doc/operators/logical_and:1.1.1.1
Rev: doc/operators/logical_or:1.1.1.1
Rev: doc/operators/minus:1.1.1.1
Rev: doc/operators/modulo:1.1.1.1
Rev: doc/operators/mult:1.1.1.1
Rev: doc/operators/not:1.1.1.1
Rev: doc/operators/not_equal:1.1.1.1
Rev: doc/operators/operators:1.1.1.1
Rev: doc/operators/or:1.1.1.1
Rev: doc/operators/plus:1.1.1.1
Rev: doc/operators/range:1.1.1.1
Rev: doc/operators/shift_left:1.1.1.1
Rev: doc/operators/shift_right:1.1.1.1
Rev: doc/operators/xor:1.1.1.1
Rev: doc/pike/all.bmml:1.1.1.1
Rev: doc/pike/cast:1.1.1.1
Rev: doc/pike/catch:1.1.1.1
Rev: doc/pike/class:1.1.1.1
Rev: doc/pike/command_line_options:1.1.1.1
Rev: doc/pike/control_structures/break:1.1.1.1
Rev: doc/pike/control_structures/catch:1.1.1.1
Rev: doc/pike/control_structures/continue:1.1.1.1
Rev: doc/pike/control_structures/do-while:1.1.1.1
Rev: doc/pike/control_structures/for:1.1.1.1
Rev: doc/pike/control_structures/foreach:1.1.1.1
Rev: doc/pike/control_structures/if-else:1.1.1.1
Rev: doc/pike/control_structures/return:1.1.1.1
Rev: doc/pike/control_structures/switch:1.1.1.1
Rev: doc/pike/control_structures/while:1.1.1.1
Rev: doc/pike/efuns.bmml:1.1.1.1
Rev: doc/pike/functions:1.1.1.1
Rev: doc/pike/gauge:1.1.1.1
Rev: doc/pike/hilfe:1.1.1.1
Rev: doc/pike/how_to_make_modules:1.1.1.1
Rev: doc/pike/inherit:1.1.1.1
Rev: doc/pike/lambda:1.1.1.1
Rev: doc/pike/modifier:1.1.1.1
Rev: doc/pike/preprocessor:1.1.1.1
Rev: doc/pike/reserved.bmml:1.1.1.1
Rev: doc/pike/sscanf:1.1.1.1
Rev: doc/pike/typeof:1.1.1.1
Rev: doc/pike/variables:1.1.1.1
Rev: doc/simulated/PI:1.1.1.1
Rev: doc/simulated/add_efun:1.1.1.1
Rev: doc/simulated/aggregage_list:1.1.1.1
Rev: doc/simulated/all_efuns:1.1.1.1
Rev: doc/simulated/capitalize:1.1.1.1
Rev: doc/simulated/describe_backtrace:1.1.1.1
Rev: doc/simulated/exec:1.1.1.1
Rev: doc/simulated/explode:1.1.1.1
Rev: doc/simulated/file_size:1.1.1.1
Rev: doc/simulated/filter:1.1.1.1
Rev: doc/simulated/filter_array:1.1.1.1
Rev: doc/simulated/get_function:1.1.1.1
Rev: doc/simulated/getenv:1.1.1.1
Rev: doc/simulated/implode:1.1.1.1
Rev: doc/simulated/l_sizeof:1.1.1.1
Rev: doc/simulated/listp:1.1.1.1
Rev: doc/simulated/m_indices:1.1.1.1
Rev: doc/simulated/m_sizeof:1.1.1.1
Rev: doc/simulated/m_values:1.1.1.1
Rev: doc/simulated/map:1.1.1.1
Rev: doc/simulated/map_array:1.1.1.1
Rev: doc/simulated/master:1.1.1.1
Rev: doc/simulated/member_array:1.1.1.1
Rev: doc/simulated/mklist:1.1.1.1
Rev: doc/simulated/mkmultiset:1.1.1.1
Rev: doc/simulated/perror:1.1.1.1
Rev: doc/simulated/popen:1.1.1.1
Rev: doc/simulated/previous_object:1.1.1.1
Rev: doc/simulated/putenv:1.1.1.1
Rev: doc/simulated/read_bytes:1.1.1.1
Rev: doc/simulated/regexp:1.1.1.1
Rev: doc/simulated/search_array:1.1.1.1
Rev: doc/simulated/sort_array:1.1.1.1
Rev: doc/simulated/spawn:1.1.1.1
Rev: doc/simulated/strlen:1.1.1.1
Rev: doc/simulated/strstr:1.1.1.1
Rev: doc/simulated/sum:1.1.1.1
Rev: doc/simulated/sum_arrays:1.1.1.1
Rev: doc/simulated/system:1.1.1.1
Rev: doc/simulated/this_function:1.1.1.1
Rev: doc/simulated/version:1.1.1.1
Rev: doc/simulated/write:1.1.1.1
Rev: doc/simulated/write_file:1.1.1.1
Rev: doc/types/array:1.1.1.1
Rev: doc/types/float:1.1.1.1
Rev: doc/types/function:1.1.1.1
Rev: doc/types/int:1.1.1.1
Rev: doc/types/mapping:1.1.1.1
Rev: doc/types/mixed:1.1.1.1
Rev: doc/types/multiset:1.1.1.1
Rev: doc/types/object:1.1.1.1
Rev: doc/types/program:1.1.1.1
Rev: doc/types/string:1.1.1.1
Rev: lib/include/array.h:1.1.1.1
Rev: lib/include/array.pre.pike:1.1.1.1
Rev: lib/include/process.h:1.1.1.1
Rev: lib/include/process.pre.pike:1.1.1.1
Rev: lib/include/simulate.h:1.1.1.1
Rev: lib/include/simulate.pre.pike:1.1.1.1
Rev: lib/include/stdio.h:1.1.1.1
Rev: lib/include/stdio.pre.pike:1.1.1.1
Rev: lib/master.pike:1.1.1.1
Rev: src/.cvsignore:1.1.1.1
Rev: src/BUGS:1.1.1.1
Rev: src/COPYING:1.1.1.1
Rev: src/COPYRIGHT:1.1.1.1
Rev: src/ChangeLog:1.1.1.1
Rev: src/DISCLAIMER:1.1.1.1
Rev: src/Makefile.src:1.1.1.1
Rev: src/README:1.1.1.1
Rev: src/alloca.c:1.1.1.1
Rev: src/array.c:1.1.1.1
Rev: src/array.h:1.1.1.1
Rev: src/backend.c:1.1.1.1
Rev: src/backend.h:1.1.1.1
Rev: src/build_modlist_h:1.1.1.1
Rev: src/builtin_functions.c:1.1.1.1
Rev: src/builtin_functions.h:1.1.1.1
Rev: src/callback.c:1.1.1.1
Rev: src/callback.h:1.1.1.1
Rev: src/compilation.h:1.1.1.1
Rev: src/config.cache:1.1.1.1
Rev: src/config.h:1.1.1.1
Rev: src/config.log:1.1.1.1
Rev: src/configure.in:1.1.1.1
Rev: src/constants.c:1.1.1.1
Rev: src/constants.h:1.1.1.1
Rev: src/docode.c:1.1.1.1
Rev: src/docode.h:1.1.1.1
Rev: src/dynamic_buffer.c:1.1.1.1
Rev: src/dynamic_buffer.h:1.1.1.1
Rev: src/efun.h:1.1.1.1
Rev: src/error.c:1.1.1.1
Rev: src/error.h:1.1.1.1
Rev: src/fd_control.c:1.1.1.1
Rev: src/fd_control.h:1.1.1.1
Rev: src/fsort.c:1.1.1.1
Rev: src/fsort.h:1.1.1.1
Rev: src/gc.c:1.1.1.1
Rev: src/gc.h:1.1.1.1
Rev: src/global.h:1.1.1.1
Rev: src/hashtable.c:1.1.1.1
Rev: src/hashtable.h:1.1.1.1
Rev: src/install-sh:1.1.1.1
Rev: src/interpret.c:1.1.1.1
Rev: src/interpret.h:1.1.1.1
Rev: src/language.y:1.1.1.1
Rev: src/las.c:1.1.1.1
Rev: src/las.h:1.1.1.1
Rev: src/lex.c:1.1.1.1
Rev: src/lex.h:1.1.1.1
Rev: src/machine.h.in:1.1.1.1
Rev: src/macros.h:1.1.1.1
Rev: src/main.c:1.1.1.1
Rev: src/main.h:1.1.1.1
Rev: src/mapping.c:1.1.1.1
Rev: src/mapping.h:1.1.1.1
Rev: src/memory.c:1.1.1.1
Rev: src/memory.h:1.1.1.1
Rev: src/module.c:1.1.1.1
Rev: src/module.h:1.1.1.1
Rev: src/modules/.cvsignore:1.1.1.1
Rev: src/modules/Makefile.src:1.1.1.1
Rev: src/modules/call_out/.cvsignore:1.1.1.1
Rev: src/modules/call_out/Makefile.src:1.1.1.1
Rev: src/modules/call_out/call_out.c:1.1.1.1
Rev: src/modules/call_out/configure.in:1.1.1.1
Rev: src/modules/call_out/doc/call_out:1.1.1.1
Rev: src/modules/call_out/doc/call_out_info:1.1.1.1
Rev: src/modules/call_out/doc/find_call_out:1.1.1.1
Rev: src/modules/call_out/doc/remove_call_out:1.1.1.1
Rev: src/modules/configure.in:1.1.1.1
Rev: src/modules/files/.cvsignore:1.1.1.1
Rev: src/modules/files/Makefile.src:1.1.1.1
Rev: src/modules/files/configure.in:1.1.1.1
Rev: src/modules/files/datagram.c:1.1.1.1
Rev: src/modules/files/doc/cd:1.1.1.1
Rev: src/modules/files/doc/errno:1.1.1.1
Rev: src/modules/files/doc/exece:1.1.1.1
Rev: src/modules/files/doc/file:1.1.1.1
Rev: src/modules/files/doc/file_stat:1.1.1.1
Rev: src/modules/files/doc/fork:1.1.1.1
Rev: src/modules/files/doc/get_dir:1.1.1.1
Rev: src/modules/files/doc/getcwd:1.1.1.1
Rev: src/modules/files/doc/mkdir:1.1.1.1
Rev: src/modules/files/doc/mv:1.1.1.1
Rev: src/modules/files/doc/port:1.1.1.1
Rev: src/modules/files/doc/rm:1.1.1.1
Rev: src/modules/files/doc/strerror:1.1.1.1
Rev: src/modules/files/doc/werror:1.1.1.1
Rev: src/modules/files/efuns.c:1.1.1.1
Rev: src/modules/files/file.c:1.1.1.1
Rev: src/modules/files/file.h:1.1.1.1
Rev: src/modules/files/file_machine.h.in:1.1.1.1
Rev: src/modules/files/socket.c:1.1.1.1
Rev: src/modules/gdbmmod/.cvsignore:1.1.1.1
Rev: src/modules/gdbmmod/Makefile.src:1.1.1.1
Rev: src/modules/gdbmmod/configure.in:1.1.1.1
Rev: src/modules/gdbmmod/doc/gdbm:1.1.1.1
Rev: src/modules/gdbmmod/gdbm_machine.h.in:1.1.1.1
Rev: src/modules/gdbmmod/gdbmmod.c:1.1.1.1
Rev: src/modules/gmpmod/.cvsignore:1.1.1.1
Rev: src/modules/gmpmod/Makefile.src:1.1.1.1
Rev: src/modules/gmpmod/configure.in:1.1.1.1
Rev: src/modules/gmpmod/doc/mpz:1.1.1.1
Rev: src/modules/gmpmod/gmp_machine.h.in:1.1.1.1
Rev: src/modules/gmpmod/mpz_glue.c:1.1.1.1
Rev: src/modules/image/Makefile.in:1.1.1.1
Rev: src/modules/image/Makefile.src:1.1.1.1
Rev: src/modules/image/configure:1.1.1.1
Rev: src/modules/image/configure.in:1.1.1.1
Rev: src/modules/image/dependencies:1.1.1.1
Rev: src/modules/image/doc.txt:1.1.1.1
Rev: src/modules/image/doc/image.html:1.1.1.1
Rev: src/modules/image/font.c:1.1.1.1
Rev: src/modules/image/image.c:1.1.1.1
Rev: src/modules/image/image.h:1.1.1.1
Rev: src/modules/image/lzw.c:1.1.1.1
Rev: src/modules/image/lzw.h:1.1.1.1
Rev: src/modules/image/quant.c:1.1.1.1
Rev: src/modules/image/togif.c:1.1.1.1
Rev: src/modules/math/.cvsignore:1.1.1.1
Rev: src/modules/math/Makefile.src:1.1.1.1
Rev: src/modules/math/configure.in:1.1.1.1
Rev: src/modules/math/doc/acos:1.1.1.1
Rev: src/modules/math/doc/asin:1.1.1.1
Rev: src/modules/math/doc/atan:1.1.1.1
Rev: src/modules/math/doc/ceil:1.1.1.1
Rev: src/modules/math/doc/cos:1.1.1.1
Rev: src/modules/math/doc/exp:1.1.1.1
Rev: src/modules/math/doc/floor:1.1.1.1
Rev: src/modules/math/doc/log:1.1.1.1
Rev: src/modules/math/doc/pow:1.1.1.1
Rev: src/modules/math/doc/sin:1.1.1.1
Rev: src/modules/math/doc/sqrt:1.1.1.1
Rev: src/modules/math/doc/tan:1.1.1.1
Rev: src/modules/math/math.c:1.1.1.1
Rev: src/modules/module_dir_marker:1.1.1.1
Rev: src/modules/pipe/Makefile.in:1.1.1.1
Rev: src/modules/pipe/Makefile.src:1.1.1.1
Rev: src/modules/pipe/config.h:1.1.1.1
Rev: src/modules/pipe/configure:1.1.1.1
Rev: src/modules/pipe/configure.in:1.1.1.1
Rev: src/modules/pipe/dependencies:1.1.1.1
Rev: src/modules/pipe/pipe.c:1.1.1.1
Rev: src/modules/readlinemod/.cvsignore:1.1.1.1
Rev: src/modules/readlinemod/Makefile.src:1.1.1.1
Rev: src/modules/readlinemod/configure.in:1.1.1.1
Rev: src/modules/readlinemod/doc/readline:1.1.1.1
Rev: src/modules/readlinemod/readline_machine.h.in:1.1.1.1
Rev: src/modules/readlinemod/readlinemod.c:1.1.1.1
Rev: src/modules/regexp/.cvsignore:1.1.1.1
Rev: src/modules/regexp/Makefile.src:1.1.1.1
Rev: src/modules/regexp/configure.in:1.1.1.1
Rev: src/modules/regexp/doc/regexp:1.1.1.1
Rev: src/modules/regexp/glue.c:1.1.1.1
Rev: src/modules/regexp/regexp.c:1.1.1.1
Rev: src/modules/regexp/regexp.h:1.1.1.1
Rev: src/modules/spider/Makefile.in:1.1.1.1
Rev: src/modules/spider/Makefile.src:1.1.1.1
Rev: src/modules/spider/configure:1.1.1.1
Rev: src/modules/spider/configure.in:1.1.1.1
Rev: src/modules/spider/defs.h:1.1.1.1
Rev: src/modules/spider/dependencies:1.1.1.1
Rev: src/modules/spider/discdate.c:1.1.1.1
Rev: src/modules/spider/encode_decode.c:1.1.1.1
Rev: src/modules/spider/http_parse.c:1.1.1.1
Rev: src/modules/spider/lock.c:1.1.1.1
Rev: src/modules/spider/lock.h:1.1.1.1
Rev: src/modules/spider/sdebug.c:1.1.1.1
Rev: src/modules/spider/shared_mem_mapping.c:1.1.1.1
Rev: src/modules/spider/sharedmem.c:1.1.1.1
Rev: src/modules/spider/sharedmem.h:1.1.1.1
Rev: src/modules/spider/spider.c:1.1.1.1
Rev: src/modules/spider/spider.h.in:1.1.1.1
Rev: src/modules/spider/stardate.c:1.1.1.1
Rev: src/modules/spider/streamed_parser.c:1.1.1.1
Rev: src/modules/spider/streamed_parser.h:1.1.1.1
Rev: src/modules/spider/tree.c:1.1.1.1
Rev: src/modules/sprintf/.cvsignore:1.1.1.1
Rev: src/modules/sprintf/Makefile.src:1.1.1.1
Rev: src/modules/sprintf/configure.in:1.1.1.1
Rev: src/modules/sprintf/doc/sprintf:1.1.1.1
Rev: src/modules/sprintf/sprintf.c:1.1.1.1
Rev: src/multiset.c:1.1.1.1
Rev: src/multiset.h:1.1.1.1
Rev: src/object.c:1.1.1.1
Rev: src/object.h:1.1.1.1
Rev: src/opcodes.c:1.1.1.1
Rev: src/opcodes.h:1.1.1.1
Rev: src/operators.c:1.1.1.1
Rev: src/operators.h:1.1.1.1
Rev: src/otable.h:1.1.1.1
Rev: src/peep.c:1.1.1.1
Rev: src/peep.h:1.1.1.1
Rev: src/peep.in:1.1.1.1
Rev: src/pike_types.c:1.1.1.1
Rev: src/pike_types.h:1.1.1.1
Rev: src/port.c:1.1.1.1
Rev: src/port.h:1.1.1.1
Rev: src/program.c:1.1.1.1
Rev: src/program.h:1.1.1.1
Rev: src/run_autoconfig:1.1.1.1
Rev: src/rusage.c:1.1.1.1
Rev: src/rusage.h:1.1.1.1
Rev: src/signal_handler.c:1.1.1.1
Rev: src/signal_handler.h:1.1.1.1
Rev: src/stamp-h:1.1.1.1
Rev: src/stralloc.c:1.1.1.1
Rev: src/stralloc.h:1.1.1.1
Rev: src/stuff.c:1.1.1.1
Rev: src/stuff.h:1.1.1.1
Rev: src/svalue.c:1.1.1.1
Rev: src/svalue.h:1.1.1.1
Rev: src/test/.cvsignore:1.1.1.1
Rev: src/test/create_testsuite:1.1.1.1
Rev: src/test/test_pike.pike:1.1.1.1
Rev: src/time_stuff.h:1.1.1.1
Rev: src/todo:1.1.1.1
Rev: src/types.h:1.1.1.1
Rev: src/ualarm.c:1.1.1.1

1:   <?xml version='1.0' encoding='utf-8'?>   <autodoc> + <namespace name='cpp'> + <doc placeholder='true'> + <text> + <p><tt>preprocessor</tt> - textually process code before compiling</p> +  + <p>Pike has a builtin C-style preprocessor. It works similar to old + C preprocessors but has a few extra features. This file describes + the different preprocessor directives.</p> +  + <tt><p><dl><group><text>#!<br/> + #define<br/> + #elif<br/> + #else<br/> + #elseif<br/> + #endif<br/> + #error<br/> + #if<br/> + #ifdef<br/> + #ifndef<br/> + #include<br/> + #line<br/> + #pragma<br/> + #undef<br/> + </text></group></dl></p> + </tt> + pike</text> +  + </doc> + <docgroup homogen-name='#!' homogen-type='directive'> + <directive name='#!'> + </directive> + <doc placeholder='true'> + <text> +  + <p>This directive is in effect a comment statement, since the + preprocessor will ignore everything to the end of the line. + This is used to write unix type scripts in Pike by starting + the script with + </p> + <p>#!/usr/local/bin/pike + </p> + </text> +  + </doc> + </docgroup> + <docgroup homogen-name='#define' homogen-type='directive'> + <directive name='#define'> + </directive> + <doc placeholder='true'> + <text> +  + <p>The simplest way to use define is to write + </p> + <p><dl><group><text>#define &lt;identifier&gt; &lt;replacement string&gt;<br/> + </text></group></dl> + </p> + <p>which will cause all subsequent occurances of 'identifier' to be + replaced with the replacement string. + </p> + <p>Define also has the capability to use arguments, thus a line like + </p> + <p><dl><group><text>#define &lt;identifier&gt;(arg1, arg2) &lt;replacement string&gt;<br/> + </text></group></dl> + </p> + <p>would cause identifer to be a macro. All occurances of + 'identifier(something1,something2d)' would be replaced with + the replacement string. And in the replacement string, arg1 and arg2 + will be replaced with something1 and something2.</p> + </text> +  + <group><bugs/><text> + <p>Note that it is not a good idea to do something like this: + </p> + <p>#define foo bar // a comment + </p> + <p>The comment will be included in the define, and thus inserted in the + code. This will have the effect that the rest of the line will be + ignored when the word foo is used. Not exactly what you might expect. + </p> + <p/> + </text></group> +  + </doc> + </docgroup> + <docgroup homogen-type='directive'> + <directive name='#if'> + </directive> + <directive name='#elif'> + </directive> + <directive name='#elseif'> + </directive> + <directive name='#else'> + </directive> + <directive name='#endif'> + </directive> + <doc placeholder='true'> + <text> +  + <p>The #if directive causes conditional compiling of code depending on + the expression after the #if directive. That is, if the expression + is true, the code up to the next #else, #elif, #elseif or #endif is + compiled. If the expression is false, that code will be skipped. + If the skip leads up to a #else, the code after the else will be + compiled. #elif and #elseif are equivialent and causes the code that + follow them to be compiled if the previous #if or #elif evaluated + false and the expression after the #elif evaluates true. + </p> + <p>Expressions given to #if, #elif or #endif are special, all identifiers + evaluate to zero unless they are defined to something else. Integers, + strings and floats are the only types that can be used, but all pike + operators can be used on these types. + </p> + <p>Also, two special functions can be used, defined() and constant(). + defined(&lt;identifer&gt;) expands to '1' if the identifier is defined, + '0' otherwise. constant(&lt;identifier&gt;) expands to '1' if identifer is + an predefined constant (with add_constant), '0' otherwise.</p> + </text> +  + <group><example/><text> + <tt><p>#if 1<br/> + <dl><group><text>write("foo");<br/> + </text></group></dl>#else<br/> + <dl><group><text>write("bar");<br/> + </text></group></dl>#endif<br/> +  + </p> + <p>#if defined(FOO)<br/> + <dl><group><text>write(FOO);<br/> + </text></group></dl>#elif defined(BAR)<br/> + <dl><group><text>write(BAR);<br/> + </text></group></dl>#else<br/> + <dl><group><text>write("default");<br/> + </text></group></dl>#endif<br/> +  + </p> + <p>#if !constant(write_file)<br/> + inherit "simulate.pike"<br/> + #endif<br/> + <br/> + </p> + </tt></text></group> +  + </doc> + </docgroup> + <docgroup homogen-name='#error' homogen-type='directive'> + <directive name='#error'> + </directive> + <doc placeholder='true'> + <text> +  + <p>This directive causes a compiler error, it can be used to notify + the user that certain functions are missing and similar things.</p> + </text> +  + <group><example/><text> + <tt><p>#if !constant(write_file)<br/> + #error write_file efun is missing<br/> + #endif<br/> + <br/> + </p> + </tt></text></group> +  + </doc> + </docgroup> + <docgroup homogen-name='#include' homogen-type='directive'> + <directive name='#include'> + </directive> + <doc placeholder='true'> + <text> +  + <p>This directive should be given a file as argument, it will then be + compiled as if all those lines were written at the #include line. + The compiler then continues to compile this file.</p> + </text> +  + <group><example/><text> + <tt><p>#include "foo.h"<br/> + <br/> + </p> + </tt></text></group> +  + </doc> + </docgroup> + <docgroup homogen-name='#line' homogen-type='directive'> + <directive name='#line'> + </directive> + <doc placeholder='true'> + <text> +  + <p>This directive tells the compiler what line and file we are compiling. + This is for instance used by the #include directive to tell the + compiler that we are compiling another file. The directive takes + the line number first, and optionally, the file afterwards. + </p> + <p>This can also be used when generating pike from something else, to + tell teh compiler where the code originally originated from.</p> + </text> +  + <group><example/><text> + <tt><p>#line 4 "foo.cf" /* The next line was generated from 4 in foo.cf */<br/> + <br/> + </p> + </tt></text></group> +  + </doc> + </docgroup> + <docgroup homogen-name='#pragma' homogen-type='directive'> + <directive name='#pragma'> + </directive> + <doc placeholder='true'> + <text> +  + <p>This is a generic directive for flags to the compiler. Currently, the + only flag available is 'all_inline' which is the same as adding the + modifier 'inline' to all functions that follows. + </p> + </text> +  + </doc> + </docgroup> + <docgroup homogen-name='#undef' homogen-type='directive'> + <directive name='#undef'> + </directive> + <doc placeholder='true'> + <text> +  + <p>This removes the effect of a #define, all subsequent occurances of + the undefined identifier will not be replaced by anything. Note that + when undefining a macro, you just give the identifer, not the + arguments.</p> + </text> +  + <group><example/><text> + <tt><p>#define foo bar<br/> + #undef foo<br/> + #define foo(bar) gazonk bar<br/> + #undef foo<br/> + <br/> + </p> + </tt></text></group> +  + </doc> + </docgroup> + </namespace>   <namespace name='predef'> -  + <docgroup homogen-name='&amp;&amp;' homogen-type='method'> + <method name='&amp;&amp;'/><doc placeholder='true'> + <text> + <p><tt>&amp;&amp;</tt> - logical and</p> +  + <tt><p>a &amp;&amp; b<br/> + </p> + </tt> + <p>This operator does logical 'and' between expressions. It first + evaluates a and returns zero if a is zero. Otherwise it returns + b. Note that b is not evaluated at all if a returns zero.</p> +  + operators</text> +  + <group><seealso/><text> + <p><ref resolved='predef::`&amp;' to='`&amp;'>`&amp;</ref> and <ref resolved='predef::&amp;&amp;' to='||'>||</ref></p> + </text></group> +  + </doc> + </docgroup>   <docgroup homogen-name='PI' homogen-type='constant'>   <constant name='PI'/><doc placeholder='true'>   <text>   <p><tt>PI</tt> - pi</p>    - <tt><p>PI<br/> + <tt><p>#include &lt;simulate.h&gt;<br/> +    </p> -  + <p>PI<br/> + </p>   </tt> - <p>This is not a function, it is a constant added by simulate.lpc. + <p>This is not a function, it is a constant added by simulate.pike.</p> +  + float</text> +  + </doc> + </docgroup> + <docgroup homogen-name='_verify_internals' homogen-type='method'> + <method name='_verify_internals'/><doc placeholder='true'> + <text> + <p><tt>_verify_internals</tt> - check Pike internals</p> +  + <tt><p>void _verify_internals();<br/>   </p> -  + </tt> + <p>This function goes through most of the internal Pike structures and + generates a fatal error if one of them is found to be out of order. + It is only used for debugging.</p> +  + debugging</text> +  + </doc> + </docgroup> + <docgroup homogen-name='`!' homogen-type='method'> + <method name='`!'/><doc placeholder='true'> + <text> + <p><tt>`!</tt> - is not true</p> +  + <tt><p>! a<br/> + or<br/> + int `!(mixed a)<br/> + </p> + </tt> + <p>Returns 1 if a is zero, 0 otherwise.</p> +  + operators</text> +  + </doc> + </docgroup> + <docgroup homogen-name='`!=' homogen-type='method'> + <method name='`!='/><doc placeholder='true'> + <text> + <p><tt>`!=</tt> - check if not equal</p> +  + <tt><p>a != b<br/> + or<br/> + int `!=(mixed a, mixed b)<br/> + </p> + </tt> + <p>This operator compares two values and returns 0 if they are the same, + 1 otherwise. Note that pointer equivialenec is required for arrays, + objects, programs, mappings and multisets. (Thus it is not enough that + two arrays LOOK alike, it must be the same array.)</p> +  + operators</text> +  + <group><seealso/><text> + <p><ref resolved='predef::`==' to='`=='>`==</ref>, <ref resolved='predef::`&lt;' to='`&lt;'>`&lt;</ref>, <ref resolved='predef::`&gt;' to='`&gt;'>`&gt;</ref>, <ref resolved='predef::`&lt;=' to='`&lt;='>`&lt;=</ref>, <ref resolved='predef::`&gt;=' to='`&gt;='>`&gt;=</ref> and <ref to='efuns/equal'>efuns/equal</ref></p> + </text></group> +  + </doc> + </docgroup> + <docgroup homogen-name='`%' homogen-type='method'> + <method name='`%'/><doc placeholder='true'> + <text> + <p><tt>`%</tt> - modulo</p> +  + <tt><p>a % b<br/> + or<br/> + int `%(int a, int b)<br/> + or<br/> + float `%(int|float a,int|float b)<br/> + </p> + </tt> + <p>This operator computes the rest of a division. For integers, this + is the same as same as computing a-(a/b)*a. For floats, modulo is + interpreted as a-floor(a/b)*a + </p>   </text>    -  + <group><example/><text> + <tt><p><matrix> + <r><c> 9%3 </c><c> returns 0 </c></r> + <r><c> 10%3 </c><c> returns 1 </c></r> + <r><c> 2%0.3 </c><c> returns 0.2 </c></r> + </matrix> + </p> + </tt> + operators</text></group> +  + <group><seealso/><text> + <p><ref resolved='predef::`/' to='`/'>`/</ref> and <ref resolved='predef::`*' to='`*'>`*</ref></p> + </text></group> +    </doc>   </docgroup> -  + <docgroup homogen-name='`&amp;' homogen-type='method'> + <method name='`&amp;'/><doc placeholder='true'> + <text> + <p><tt>`&amp;</tt> - intersection</p> +  + <tt><p>a &amp; b<br/> + or<br/> + mixed `&amp;(mixed ... args)<br/> + </p> + </tt> + <p>This operator does logical intersections. For ints this means + bitwise and. + </p> + <p>Arrays and multisets are treated as sets, so intersecting two arrays + will result in an array with containing all values present in all + arguments. + </p> + <p>For mappings, the intersection will be done on the indexes solely, + however, the values will be taken from the rightmost mapping.</p> +  + operators</text> +  + <group><seealso/><text> + <p><ref resolved='predef::`|' to='`|'>`|</ref>, <ref resolved='predef::`^' to='`^'>`^</ref> and <ref resolved='predef::`&amp;' to='&amp;&amp;'>&amp;&amp;</ref></p> + </text></group> +  + </doc> + </docgroup> + <docgroup homogen-name='`*' homogen-type='method'> + <method name='`*'/><doc placeholder='true'> + <text> + <p><tt>`*</tt> - multiplication</p> +  + <tt><p>a * b<br/> + or<br/> + int `*(int ... args)<br/> + or<br/> + float `*(int|float ... args)<br/> + or<br/> + string `*(string *strings, string delimeter)<br/> + </p> + </tt> + <p>For ints and floats, this operator simply multiplies its arguments. + If the first argument is an array, and the second a string, all + strings in the arrays will be concatenated, with the delimiter in + between each string and the result will be returned.</p> + </text> +  + <group><example/><text> + <tt><p><matrix> + <r><c> 2*2 </c><c> returns 4 </c></r> + <r><c> 2.0*2.0 </c><c> returns 4.0 </c></r> + <r><c> 2.0*2 </c><c> returns 4.0 </c></r> + <r><c> ({"f","",""})*"o") </c><c> Returns "foo" </c></r> + <r><c> `*(2,2,2) </c><c> returns 8 </c></r> + </matrix> + </p> + </tt> + operators</text></group> +  + <group><seealso/><text> + <p><ref resolved='predef::`/' to='`/'>`/</ref></p> + </text></group> +  + </doc> + </docgroup> + <docgroup homogen-name='`+' homogen-type='method'> + <method name='`+'/><doc placeholder='true'> + <text> + <p><tt>`+</tt> - add things together</p> +  + <tt><p>a + b<br/> + or<br/> + mixed `+(mixed ... args)<br/> + </p> + </tt> + <p>For ints and floats this operator simply adds the two operators + together. For strings and arrays, concatenation is done. For multisets + and mapping this creates a new multiset/mapping with all indices and data as + in a and b. Note that this can cause a multiset to contain + several equal indices. Also, when adding a string to an int or float + the number is converted to a printable string first.</p> + </text> +  + <group><example/><text> + <tt><p><matrix> + <r><c> "a"+10 </c><c> returns "a10" </c></r> + <r><c> 10+20 </c><c> returns 30 </c></r> + <r><c> ({1})+({2}) </c><c> returns ({1,2}) </c></r> + <r><c> (&lt;1&gt;)+(&lt;1&gt;) </c><c> returns (&lt;1,1&gt;) </c></r> + <r><c> `+(2,2,2) </c><c> returns 6 </c></r> + </matrix> + </p> + </tt> + operators</text></group> +  + <group><seealso/><text> + <p><ref resolved='predef::`-' to='`-'>`-</ref> and <ref resolved='predef::`*' to='`*'>`*</ref></p> + </text></group> +  + </doc> + </docgroup> + <docgroup homogen-name='`-' homogen-type='method'> + <method name='`-'/><doc placeholder='true'> + <text> + <p><tt>`-</tt> - subtract/negate</p> +  + <tt><p>- a<br/> + or<br/> + `-(mixed <i>a</i>);<br/> + or<br/> + a - b<br/> + or<br/> + mixed `-(mixed a, mixed b)<br/> + </p> + </tt> + <p>This is the negation and subtraction operator, for ints and floats + the operation should be obvious. + </p> + <p>For arrays, an array containing all elements present in a and not in + b is returne. The order of the remaining values from a will be kept. + </p> + <p>For multisets, the same operation is done as for arrays, except order is + of course not considered. + </p> + <p><matrix> + <r><c> For mappings, a mapping is returned with every key-index pair from </c></r> + <r><c> a whos index is not present as an index in b. </c></r> + <r><c> EXAMPLES </c></r> + <r><c> 5-10 </c><c> returns -5 </c></r> + <r><c> 10-2.0 </c><c> returns 8.0 </c></r> + <r><c> ({1,2})-({2}) </c><c> returns ({1}) </c></r> + <r><c> ([1:2,2:1])-([1:0]) </c><c> returns ([2:1]) </c></r> + </matrix> + </p> +  + operators</text> +  + <group><seealso/><text> + <p><ref resolved='predef::`+' to='`+'>`+</ref></p> + </text></group> +  + </doc> + </docgroup> + <docgroup homogen-name='`/' homogen-type='method'> + <method name='`/'/><doc placeholder='true'> + <text> + <p><tt>`/</tt> - division</p> +  + <tt><p>a / b<br/> + or<br/> + int `/(int a, int b)<br/> + or<br/> + float `/(int|float a,int|float b)<br/> + or<br/> + string* `/(string a,string b)<br/> + </p> + </tt> + <p>For ints and floats, this operator simply divide its arguments. + If the arguments are strings, the first string will be divided + at every occurance of the second string. The resulting pieces + are then returned in the form of an array.</p> + </text> +  + <group><example/><text> + <tt><p><matrix> + <r><c> 2/2 </c><c> returns 1 </c></r> + <r><c> 3/2 </c><c> returns 1 </c></r> + <r><c> 2.0/2.0 </c><c> returns 1.0 </c></r> + <r><c> 2.0/2 </c><c> returns 1.0 </c></r> + <r><c> "foo"/"o" </c><c> returns ({"f","",""}) </c></r> + <r><c> `/(2,2) </c><c> returns 1 </c></r> + </matrix> + </p> + </tt> + operators</text></group> +  + <group><seealso/><text> + <p><ref resolved='predef::`*' to='`*'>`*</ref> and <ref resolved='predef::`%' to='`%'>`%</ref></p> + </text></group> +  + </doc> + </docgroup> + <docgroup homogen-name='`&lt;' homogen-type='method'> + <method name='`&lt;'/><doc placeholder='true'> + <text> + <p><tt>`&lt;</tt> - is lesser than?</p> +  + <tt><p>a &lt; b<br/> + or<br/> + int `&lt;(int|float|string a,int|float|string b)<br/> + </p> + </tt> + <p>This operator compares two values and returns 1 if the first one + is lesser than the second one.</p> +  + operators</text> +  + <group><seealso/><text> + <p><ref resolved='predef::`!=' to='`!='>`!=</ref>, <ref resolved='predef::`==' to='`=='>`==</ref>, <ref resolved='predef::`&gt;' to='`&gt;'>`&gt;</ref>, <ref resolved='predef::`&lt;=' to='`&lt;='>`&lt;=</ref> and <ref resolved='predef::`&gt;=' to='`&gt;='>`&gt;=</ref></p> + </text></group> +  + </doc> + </docgroup> + <docgroup homogen-name='`&lt;&lt;' homogen-type='method'> + <method name='`&lt;&lt;'/><doc placeholder='true'> + <text> + <p><tt>`&lt;&lt;</tt> - shift left</p> +  + <tt><p>a &lt;&lt; b<br/> + or<br/> + int `&lt;&lt;(int a, int b)<br/> + </p> + </tt> + <p>This operator shift the integer a b steps left. This is equal to + multiplying a by 2 b times.</p> +  + operators</text> +  + <group><seealso/><text> + <p><ref resolved='predef::`&gt;&gt;' to='`&gt;&gt;'>`&gt;&gt;</ref></p> + </text></group> +  + </doc> + </docgroup> + <docgroup homogen-name='`&lt;=' homogen-type='method'> + <method name='`&lt;='/><doc placeholder='true'> + <text> + <p><tt>`&lt;=</tt> - is lesser or equal than?</p> +  + <tt><p>a &lt;= b<br/> + or<br/> + int `&lt;=(int|float|string a,int|float|string b)<br/> + </p> + </tt> + <p>This operator compares two values and returns 1 if the first one + is lesser than or equal to the second one.</p> +  + operators</text> +  + <group><seealso/><text> + <p><ref resolved='predef::`!=' to='`!='>`!=</ref>, <ref resolved='predef::`==' to='`=='>`==</ref>, <ref resolved='predef::`&gt;' to='`&gt;'>`&gt;</ref>, <ref resolved='predef::`&lt;' to='`&lt;'>`&lt;</ref> and <ref resolved='predef::`&gt;=' to='`&gt;='>`&gt;=</ref></p> + </text></group> +  + </doc> + </docgroup> + <docgroup homogen-name='`==' homogen-type='method'> + <method name='`=='/><doc placeholder='true'> + <text> + <p><tt>`==</tt> - compare values</p> +  + <tt><p>a == b<br/> + or<br/> + int `==(mixed a, mixed b)<br/> + </p> + </tt> + <p>This operator compares two values and returns 1 if they are the same, + 0 otherwise. Note that pointer equivialenec is required for arrays, + objects, programs, mappings and multisets. (Thus it is not enough that + two arrays LOOK alike, it must be the same array.)</p> +  + operators</text> +  + <group><seealso/><text> + <p><ref resolved='predef::`!=' to='`!='>`!=</ref>, <ref resolved='predef::`&lt;' to='`&lt;'>`&lt;</ref>, <ref resolved='predef::`&gt;' to='`&gt;'>`&gt;</ref>, <ref resolved='predef::`&lt;=' to='`&lt;='>`&lt;=</ref>, <ref resolved='predef::`&gt;=' to='`&gt;='>`&gt;=</ref> and <ref to='efuns/equal'>efuns/equal</ref></p> + </text></group> +  + </doc> + </docgroup> + <docgroup homogen-name='`&gt;' homogen-type='method'> + <method name='`&gt;'/><doc placeholder='true'> + <text> + <p><tt>`&gt;</tt> - is lesser than?</p> +  + <tt><p>a &gt; b<br/> + or<br/> + int `&gt;(int|float|string a,int|float|string b)<br/> + </p> + </tt> + <p>This operator compares two values and returns 1 if the first one + is greater than the second one.</p> +  + operators</text> +  + <group><seealso/><text> + <p><ref resolved='predef::`!=' to='`!='>`!=</ref>, <ref resolved='predef::`==' to='`=='>`==</ref>, <ref resolved='predef::`&lt;' to='`&lt;'>`&lt;</ref>, <ref resolved='predef::`&lt;=' to='`&lt;='>`&lt;=</ref> and <ref resolved='predef::`&gt;=' to='`&gt;='>`&gt;=</ref></p> + </text></group> +  + </doc> + </docgroup> + <docgroup homogen-name='`&gt;=' homogen-type='method'> + <method name='`&gt;='/><doc placeholder='true'> + <text> + <p><tt>`&gt;=</tt> - is greater than or equal to?</p> +  + <tt><p>a &gt;= b<br/> + or<br/> + int `&gt;=(int|float|string a,int|float|string b)<br/> + </p> + </tt> + <p>This operator compares two values and returns 1 if the first one + is greater than or equal to the second one.</p> +  + operators</text> +  + <group><seealso/><text> + <p><ref resolved='predef::`!=' to='`!='>`!=</ref>, <ref resolved='predef::`==' to='`=='>`==</ref>, <ref resolved='predef::`&gt;' to='`&gt;'>`&gt;</ref>, <ref resolved='predef::`&lt;' to='`&lt;'>`&lt;</ref> and <ref resolved='predef::`&lt;=' to='`&lt;='>`&lt;=</ref></p> + </text></group> +  + </doc> + </docgroup> + <docgroup homogen-name='`&gt;&gt;' homogen-type='method'> + <method name='`&gt;&gt;'/><doc placeholder='true'> + <text> + <p><tt>`&gt;&gt;</tt> - shift right</p> +  + <tt><p>a &gt;&gt; b<br/> + or<br/> + int `&gt;&gt;(int a, int b)<br/> + </p> + </tt> + <p>This operator shift the integer a b steps right. This is equal to + dividing a by 2 b times.</p> +  + operators</text> +  + <group><seealso/><text> + <p><ref resolved='predef::`&lt;&lt;' to='`&lt;&lt;'>`&lt;&lt;</ref></p> + </text></group> +  + </doc> + </docgroup> + <docgroup homogen-name='`^' homogen-type='method'> + <method name='`^'/><doc placeholder='true'> + <text> + <p><tt>`^</tt> - exclusive or</p> +  + <tt><p>a ^ b<br/> + or<br/> + mixed `^(mixed ... args)<br/> + </p> + </tt> + <p>This operator does logical exclusive or operations For ints this means + bitwise xor. + </p> + <p>Arrays and multisets are treated as sets, so xoring two arrays will + result in an array with containing all values present in either but + not both arrays. + </p> + <p>For mappings, the intersection will be done on the indexes solely, + however, the values will be taken from the rightmost mapping.</p> +  + operators</text> +  + <group><seealso/><text> + <p><ref resolved='predef::`|' to='`|'>`|</ref> and <ref resolved='predef::`&amp;' to='`&amp;'>`&amp;</ref></p> + </text></group> +  + </doc> + </docgroup> + <docgroup homogen-name='`|' homogen-type='method'> + <method name='`|'/><doc placeholder='true'> + <text> + <p><tt>`|</tt> - union</p> +  + <tt><p>a | b<br/> + or<br/> + mixed `|(mixed ... args)<br/> + </p> + </tt> + <p>This operator does logical unions. For ints this means bitwise or. + </p> + <p>Arrays and multisets are treated as sets, so doing a union on two arrays + will result in an array with containing all values present in either + array. Although values present in both ararys will only be present + once in the result. + </p> + <p>For mappings, the intersection will be done on the indexes solely, + however, the values will be taken from the rightmost mapping.</p> +  + operators</text> +  + <group><seealso/><text> + <p><ref resolved='predef::`&amp;' to='`&amp;'>`&amp;</ref>, <ref resolved='predef::`^' to='`^'>`^</ref> and <ref resolved='predef::`|' to='||'>||</ref></p> + </text></group> +  + </doc> + </docgroup> + <docgroup homogen-name='`~' homogen-type='method'> + <method name='`~'/><doc placeholder='true'> + <text> + <p><tt>`~</tt> - bitwise complement</p> +  + <tt><p>~ a<br/> + or<br/> + int `~(int a)<br/> + </p> + </tt> + <p>This operator inverses all bits in an integer and returns the + new integer.</p> +  + operators</text> +  + <group><seealso/><text> + <p><ref resolved='predef::`&amp;' to='`&amp;'>`&amp;</ref>, <ref resolved='predef::`|' to='`|'>`|</ref> and <ref resolved='predef::`^' to='`^'>`^</ref></p> + </text></group> +  + </doc> + </docgroup>   <docgroup homogen-name='acos' homogen-type='method'>   <method name='acos'/><doc placeholder='true'>   <text>
24:   </p>   </tt>   <p>Return the arcus cosinus value for f.</p> - </text> +     -  + float</text> +    <group><seealso/><text>   <p><ref resolved='predef::cos' to='predef::cos'>math/cos</ref> and <ref resolved='predef::asin' to='predef::asin'>math/asin</ref></p>   </text></group>      </doc>   </docgroup> - <docgroup homogen-name='add_efun' homogen-type='method'> - <method name='add_efun'/><doc placeholder='true'> + <docgroup homogen-name='add_constant' homogen-type='method'> + <method name='add_constant'/><doc placeholder='true'>   <text> - <p><tt>add_efun</tt> - add new predefined functions or constants</p> + <p><tt>add_constant</tt> - add new predefined functions or constants</p>    - <tt><p>void add_efun(string <i>name</i>, mixed <i>value</i>);<br/> + <tt><p>void add_constant(string <i>name</i>, mixed <i>value</i>);<br/>   or<br/> - void add_efun(string <i>name</i>);<br/> + void add_constant(string <i>name</i>);<br/>   </p>   </tt> - <p>This function adds a new constant to uLPC, it is often used to - add builin functions (efuns). All programs compiled after add_efun + <p>This function adds a new constant to Pike, it is often used to + add builin functions (efuns). All programs compiled after add_constant   function is called can access 'value' by the name given by 'name'. - If there is an efun called 'name' already, it will be replaced by + If there is a constant called 'name' already, it will be replaced by   by the new definition. This will not affect already compiled programs.   </p> - <p>Calling add_efun without a value will remove that name from the list<br/> + <p>Calling add_constant without a value will remove that name from the list<br/>   <dl><group><text><matrix> - <r><c> </c><c> of of efuns. As with replacing, this will not affect already compiled </c></r> + <r><c> </c><c> of of constant. As with replacing, this will not affect already compiled </c></r>   <r><c> </c></r>   </matrix>   </text></group></dl>programs.<br/>
58:   </text>      <group><example/><text> - <tt><p>add_efun("true",1);<br/> - add_efun("false",0);<br/> - add_efun("PI",4.0);<br/> - add_efun("sqr",lambda(mixed x) { return x * x; });<br/> - add_efun("add_efun");<br/> + <tt><p>add_constant("true",1);<br/> + add_constant("false",0);<br/> + add_constant("PI",4.0);<br/> + add_constant("sqr",lambda(mixed x) { return x * x; });<br/> + add_constant("add_constant");<br/>   </p>   </tt></text></group>      <group><seealso/><text> - <p><ref resolved='predef::all_efuns' to='all_efuns'>all_efuns</ref></p> + <p><ref resolved='predef::all_constants' to='all_constants'>all_constants</ref></p>   </text></group>      </doc>   </docgroup> - <docgroup homogen-name='addition' homogen-type='method'> - <method name='addition'/><doc placeholder='true'> + <docgroup homogen-name='add_efun' homogen-type='method'> + <method name='add_efun'/><doc placeholder='true'>   <text> - <p><tt>addition</tt> - add things together</p> + <p><tt>add_efun</tt> - add an efun or constant</p>    - <tt><p>a + b<br/> + <tt><p>#include &lt;simulate.h&gt;<br/> +  + </p> + <p>void add_efun(string func_name, mixed function)<br/>   or<br/> - mixed sum(mixed ...)<br/> + void add_efun(string func_name)<br/>   </p>   </tt> - <p>For ints and floats this operator simply adds the two operators - together. For strings and arrays, concatenation is done. For lists - and mapping this creates a new list with all indices and data as - in a and b. Note that this can cause a list or mapping to contain - several equal indices. Also, when adding a string to an int or float - the number is converted to a printable string first.</p> + <p>This function is the same as add_constant.</p>   </text>    - <group><example/><text> - <tt><p><matrix> - <r><c> "a"+10 </c><c> </c><c> returns "a10" </c></r> - <r><c> 10+20 </c><c> </c><c> returns 30 </c></r> - <r><c> ({1})+({2}) </c><c> returns ({1,2}) </c></r> - <r><c> (&lt;1&gt;)+(&lt;1&gt;) </c><c> returns (&lt;1,1&gt;) </c></r> - </matrix> + <group><seealso/><text> + <p><ref resolved='predef::add_constant' to='predef::add_constant'>builtin/add_constant</ref></p> + </text></group> +  + </doc> + </docgroup> + <docgroup homogen-name='aggregage_list' homogen-type='method'> + <method name='aggregage_list'/><doc placeholder='true'> + <text> + <p><tt>aggregage_list</tt> - aggregate a multiset</p> +  + <tt><p>#include &lt;simulate.h&gt;<br/> +    </p> - </tt></text></group> + <p>multiset aggregage_list(mixed ... <i>args</i>);<br/> + </p> + </tt> + <p>This function is exactly the same as aggregate_multiset.</p> + </text>      <group><seealso/><text> - <p><ref to='subtraction'>subtraction</ref>, <ref resolved='predef::sum' to='predef::sum'>efun/sum</ref> and <ref to='multiplication'>multiplication</ref></p> + <p><ref resolved='predef::aggregate_multiset' to='predef::aggregate_multiset'>builtin/aggregate_multiset</ref></p>   </text></group>      </doc>
117:   </p>   </tt>   <p>Construct an array with the arguments as indices. This function - could be written in LPC as: + could be written in Pike as:   </p>   <p>mixed *aggregate(mixed ... elems) { return elems; }</p>   </text>
135:      </doc>   </docgroup> - <docgroup homogen-name='aggregate_list' homogen-type='method'> - <method name='aggregate_list'/><doc placeholder='true'> + <docgroup homogen-name='aggregate_mapping' homogen-type='method'> + <method name='aggregate_mapping'/><doc placeholder='true'>   <text> - <p><tt>aggregate_list</tt> - construct a list</p> + <p><tt>aggregate_mapping</tt> - construct a mapping</p>    - <tt><p>list aggregate_list(mixed ... <i>elems</i>);<br/> + <tt><p>mapping aggregate_mapping(mixed ... <i>elems</i>);<br/>   or<br/> -  + ([ key1:val1, key2:val2, ... ])<br/> + </p> + </tt> + <p>Groups the arguments together two and two to key-index pairs and + creates a mapping of those pairs. The second syntax is always + preferable.</p> +  + mapping</text> +  + <group><seealso/><text> + <p><ref resolved='predef::sizeof' to='sizeof'>sizeof</ref>, <ref resolved='predef::mappingp' to='mappingp'>mappingp</ref> and <ref resolved='predef::mkmapping' to='mkmapping'>mkmapping</ref></p> + </text></group> +  + </doc> + </docgroup> + <docgroup homogen-name='aggregate_multiset' homogen-type='method'> + <method name='aggregate_multiset'/><doc placeholder='true'> + <text> + <p><tt>aggregate_multiset</tt> - construct a multiset</p> +  + <tt><p>multiset aggregate_multiset(mixed ... <i>elems</i>);<br/> + or<br/>   (&lt; elem1, elem2, ... &gt;)<br/>   </p>   </tt> - <p>Construct an list with the arguments as indexes. This function - could be written in LPC as: + <p>Construct an multiset with the arguments as indexes. This function + could be written in Pike as:   </p> - <p>list aggregate(mixed ... elems) { return mklist(elems); }</p> + <p>multiset aggregate(mixed ... elems) { return mkmultiset(elems); } + </p> + <p>The only problem is that mkmultiset is implemented using + aggregage_multiset...</p>    - list</text> + multiset</text>      <group><seealso/><text> - <p><ref resolved='predef::sizeof' to='sizeof'>sizeof</ref>, <ref resolved='predef::listp' to='listp'>listp</ref> and <ref resolved='predef::mklist' to='mklist'>mklist</ref></p> + <p><ref resolved='predef::sizeof' to='sizeof'>sizeof</ref>, <ref resolved='predef::multisetp' to='multisetp'>multisetp</ref> and <ref resolved='predef::mkmultiset' to='mkmultiset'>mkmultiset</ref></p>   </text></group>      </doc>   </docgroup> - <docgroup homogen-name='aggregate_mapping' homogen-type='method'> - <method name='aggregate_mapping'/><doc placeholder='true'> + <docgroup homogen-name='alarm' homogen-type='method'> + <method name='alarm'/><doc placeholder='true'>   <text> - <p><tt>aggregate_mapping</tt> - construct a mapping</p> + <p><tt>alarm</tt> - set an alarm clock for delivery of a signal</p>    - <tt><p>mapping aggregate_mapping(mixed ... <i>elems</i>);<br/> - or<br/> - (&lt; key1:val1, key2:val2, ... &gt;)<br/> + <tt><p>int alarm(int <i>seconds</i>);<br/>   </p>   </tt> - <p>Groups the arguments together two and two to key-index pairs and - creates a mapping of those pairs. The second syntax is always - preferable.</p> + <p>alarm arranges for a SIGALRM signal to be delivered to the + process in seconds seconds. + </p> + <p>If seconds is zero, no new alarm is scheduled. + </p> + <p>In any event any previously set alarm is cancelled.</p> + </text>    - list</text> + <group><returns/><text> + <p>alarm returns the number of seconds remaining until any + previously scheduled alarm was due to be delivered, or + zero if there was no previously scheduled alarm.</p> + </text></group>      <group><seealso/><text> - <p><ref resolved='predef::sizeof' to='sizeof'>sizeof</ref>, <ref resolved='predef::mappingp' to='mappingp'>mappingp</ref> and <ref resolved='predef::mkmapping' to='mkmapping'>mkmapping</ref></p> + <p><ref resolved='predef::signal' to='signal'>signal</ref></p>   </text></group>      </doc>   </docgroup> -  + <docgroup homogen-name='all_constants' homogen-type='method'> + <method name='all_constants'/><doc placeholder='true'> + <text> + <p><tt>all_constants</tt> - return all predefined constants</p> +  + <tt><p>mapping (string:mixed) <i>all_constant</i>();<br/> + </p> + </tt> + <p>Return a mapping containing all constants, indexed on the names of the + constant, and with the value of the efun as argument.</p> + </text> +  + <group><seealso/><text> + <p><ref resolved='predef::add_constant' to='add_constant'>add_constant</ref></p> + </text></group> +  + </doc> + </docgroup>   <docgroup homogen-name='all_efuns' homogen-type='method'>   <method name='all_efuns'/><doc placeholder='true'>   <text> - <p><tt>all_efuns</tt> - return all efuns</p> + <p><tt>all_efuns</tt> - return all 'efuns'</p>    - <tt><p>mapping (string:mixed) <i>all_efuns</i>();<br/> + <tt><p>#include &lt;simulate.h&gt;<br/> +    </p> -  + <p>mapping all_efuns();<br/> + </p>   </tt> - <p>Return a mapping containing all efuns, indexed on the names of the - efuns, and with the value of the efun as argument.</p> + <p>This function is the same as all_constants.</p>   </text>      <group><seealso/><text> - <p><ref resolved='predef::add_efun' to='add_efun'>add_efun</ref></p> + <p><ref resolved='predef::all_constants' to='all_constants'>all_constants</ref></p>   </text></group>      </doc>
203:   <text>   <p><tt>allocate</tt> - allocate an array</p>    - <tt><p>mixed *allocate(int <i>size</i>, [ string <i>type</i> ]);<br/> + <tt><p>mixed *allocate(int <i>size</i>);<br/>   </p>   </tt> - <p>Allocate an array of size elements. Optionally, write what type you - want to store in the array in the second argument as a string. - Note that the type given in this string should be simple, instead - of writing "int ***" just write "array".</p> + <p>Allocate an array of size elements and initialize them to zero.</p>   </text>      <group><example/><text>   <tt><p>mixed *a=allocate(17);<br/> - int *b=allocate(17, "int");<br/> - int **c=allocate(17, "array");<br/> - mapping *c=allocate(17, "mapping");<br/> - array (list (int)) c=allocate(17, "list");<br/> - array (string) c=allocate(17, "string");<br/> +    </p>   </tt></text></group>   
245:   </p>   </tt>   <p>Arrays are basically a place to store a number of other values. - Arrays in lpc are allocated blocks of values. They are dynamically + Arrays in pike are allocated blocks of values. They are dynamically   allocated and does not need to be declared as in C. The values in   the array can be set when creating the array as in the first   construction or anytime afterwards like this: arr[index]=data where - index is an integer greater or equal to 0 and smaller than the array - size. Note that arrays are shared and use reference counts to keep + index is an integer. Index is normally 0 &lt;= index &lt; sizeof(arr), and + refers to the corresponding element in the array. If index is less + than zero, it is the same as doing arr[sizeof(arr)+index]. This + means that negative index will index the array from the end rather + than from the beginning. + </p> + <p>Note that arrays are shared and use reference counts to keep   track of their references. This will have the effect that you can   have two variables pointing to the same array, and when you change   an index in in it, both variables will show the change.
258:   <p>Here follows a list of operators that applies to arrays:   In this list a and b is used to represent an array expression:   </p> - <p>a + b : summation ( ({1}) + ({2}) returns ({1,2}) )<br/> - a - b : subtraction, returns a copy of a with all values that are<br/> - <dl><group><text>present in b removed, ( ({1, 2, 3}) - ({2}) returns ({1,3}) )<br/> - </text></group></dl><matrix> - <r><c> a &amp; b : intersection, return an array with all values that are </c></r> - <r><c> </c><c> present in both a and b </c></r> - <r><c> a | b : union, return an array with all values that are present in </c></r> + <p><matrix> + <r><c> a + b </c><c> summation ( ({1}) + ({2}) returns ({1,2}) ) </c></r> + <r><c> a - b </c><c> subtraction, returns a copy of a with all values that are present in b removed, ( ({1, 2, 3}) - ({2}) returns ({1,3}) ) </c></r> + <r><c> a &amp; b </c><c> intersection, return an array with all values that are present in both a and b </c></r> + <r><c> a | b </c><c> 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. </c></r> + <r><c> a ^ b </c><c> xor, return an array with all values that are present in a or b but not in both. </c></r> + <r><c> a * c </c><c> multiplication (c is a string) same thing as implode(a,c) </c></r> + <r><c> a == b </c><c> returns 1 if a is the same array as b, same size and values is not enough. </c></r> + <r><c> a != b </c><c> returns 0 if a is the same array as b, same size and values is not enough. </c></r> + <r><c> ! a </c><c> boolean not, returns 0 </c></r> + <r><c> a[c] </c><c> indexing, returns element c in the array (c is an int) </c></r> + <r><c> a[c]=d </c><c> setting, sets element c in the array to d (c is an int) </c></r> + <r><c> a[c..d] </c><c> range (c &amp; 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. </c></r>   </matrix> - <dl><group><text>a or b, differs from summation in that values that are<br/> - present in both a and b are only returned once.<br/> - </text></group></dl>a ^ b : xor, return an array with all values that are present in<br/> - <dl><group><text>a or b but not in both.<br/> - </text></group></dl>a * c : multiplication (c is a string) same thing as implode(a,c)<br/> - a == b : returns 1 if a is the same array as b, same size and values<br/> - <dl><group><text>is not enough.<br/> - </text></group></dl>a != b : returns 0 if a is the same array as b, same size and values<br/> - <dl><group><text>is not enough.<br/> - </text></group></dl>! a : boolean not, returns 0<br/> - a[c] : indexing, returns element c in the array (c is an int)<br/> - a[c]=d : setting, sets element c in the array to d (c is an int)<br/> - a[c..d]: range (c &amp; d are ints) returns an array containing a pice of<br/> - <dl><group><text>the array a. The piece starts at element c and ends (and<br/> - includes) element d.<br/> - </text></group></dl></p> - </text> + </p>    -  + types</text> +    <group><seealso/><text> - <p><ref resolved='predef::mapping' to='mapping'>mapping</ref>, <ref resolved='predef::list' to='list'>list</ref>, <ref resolved='predef::allocate' to='predef::allocate'>builtin/allocate</ref>, <ref resolved='predef::sizeof' to='predef::sizeof'>builtin/sizeof</ref> and <ref resolved='predef::values' to='predef::values'>builtin/values</ref></p> + <p><ref resolved='predef::mapping' to='mapping'>mapping</ref>, <ref resolved='predef::multiset' to='multiset'>multiset</ref>, <ref resolved='predef::allocate' to='predef::allocate'>builtin/allocate</ref> and <ref resolved='predef::sizeof' to='predef::sizeof'>builtin/sizeof</ref></p>   </text></group>      </doc>
303:   array</text>      <group><seealso/><text> - <p><ref resolved='predef::allocate' to='allocate'>allocate</ref>, <ref resolved='predef::intp' to='intp'>intp</ref>, <ref resolved='predef::programp' to='programp'>programp</ref>, <ref resolved='predef::floatp' to='floatp'>floatp</ref>, <ref resolved='predef::stringp' to='stringp'>stringp</ref>, <ref resolved='predef::objectp' to='objectp'>objectp</ref>, <ref to='regexpp'>regexpp</ref>, <ref resolved='predef::mappingp' to='mappingp'>mappingp</ref>, <ref resolved='predef::listp' to='listp'>listp</ref> and <ref resolved='predef::functionp' to='functionp'>functionp</ref></p> + <p><ref resolved='predef::allocate' to='allocate'>allocate</ref>, <ref resolved='predef::intp' to='intp'>intp</ref>, <ref resolved='predef::programp' to='programp'>programp</ref>, <ref resolved='predef::floatp' to='floatp'>floatp</ref>, <ref resolved='predef::stringp' to='stringp'>stringp</ref>, <ref resolved='predef::objectp' to='objectp'>objectp</ref>, <ref resolved='predef::mappingp' to='mappingp'>mappingp</ref>, <ref resolved='predef::multisetp' to='multisetp'>multisetp</ref> and <ref resolved='predef::functionp' to='functionp'>functionp</ref></p>   </text></group>      </doc>
317:   </p>   </tt>   <p>Return the arcus sinus value for f.</p> - </text> +     -  + float</text> +    <group><seealso/><text>   <p><ref resolved='predef::sin' to='predef::sin'>math/sin</ref> and <ref resolved='predef::acos' to='predef::acos'>math/acos</ref></p>   </text></group>
334:   </p>   </tt>   <p>Return the arcus tangent value for f.</p> - </text> +     -  + float</text> +    <group><seealso/><text>   <p><ref resolved='predef::tan' to='predef::tan'>math/tan</ref>, <ref resolved='predef::asin' to='predef::asin'>math/asin</ref> and <ref resolved='predef::acos' to='predef::acos'>math/acos</ref></p>   </text></group>
355:   in the stack. Each entry has this format:   </p>   <p>({<br/> - <dl><group><text>file, /* a string with the filename if known, else zero */<br/> - function, /* The function-pointer to the called function */<br/> - line, /* an integer containing the line if known, else zero */<br/> + <dl><group><text><matrix> + <r><c> file, </c><c> /* a string with the filename if known, else zero */ </c></r> + <r><c> function, </c><c> /* The function-pointer to the called function */ </c></r> + <r><c> line, </c><c> /* an integer containing the line if known, else zero */ </c></r> + </matrix>   </text></group></dl>})<br/>      </p>
371:      </doc>   </docgroup> + <docgroup homogen-name='break' homogen-type='method'> + <method name='break'/><doc placeholder='true'> + <text> + <p><tt>break</tt> - break a loop or switch</p> +  + <tt><p>break<br/> + </p> + </tt> + <p>Break jumps directly out of any loop or switch statement, it is + a very vital part of every switch statement.</p> +  + control</text> +  + <group><seealso/><text> + <p><ref to='do-while'>do-while</ref>, <ref resolved='predef::while' to='while'>while</ref>, <ref resolved='predef::for' to='for'>for</ref> and <ref resolved='predef::switch' to='switch'>switch</ref></p> + </text></group> +  + </doc> + </docgroup>   <docgroup homogen-name='call_function' homogen-type='method'>   <method name='call_function'/><doc placeholder='true'>   <text>
385:   this function with the rest of the arguments as arguments. Normally,   you will never have to write call_function(), because you will use the   second syntax instead.</p> - </text> +     -  + function</text> +    <group><seealso/><text>   <p><ref resolved='predef::backtrace' to='backtrace'>backtrace</ref> and <ref resolved='predef::get_function' to='get_function'>get_function</ref></p>   </text></group>
398:   <text>   <p><tt>call_out</tt> - make a delayed call to a function</p>    - <tt><p>void call_out(function <i>f</i>, int <i>delay</i>, mixed ... <i>args</i>);<br/> + <tt><p>mixed call_out(function <i>f</i>, int <i>delay</i>, mixed ... <i>args</i>);<br/>   </p>   </tt>   <p>Call_out places a call to the function f with the argument args - in a queue to be called in about delay seconds.</p> + in a queue to be called in about delay seconds. The return value + identifies this call out. The return value can be sent to + find_call_out or remove_call_out to remove the call out again.</p>   </text>      <group><seealso/><text>
424:   contains an array that looks like this:   </p>   <p>({<br/> - <dl><group><text>time_left, /* an int */<br/> - caller, /* the object that made the call out */<br/> - function, /* the function to be called */<br/> - arg1, /* the first argument, if any */<br/> - arg2, /* the second argument, if any */<br/> - ... /* and so on... */<br/> + <dl><group><text><matrix> + <r><c> time_left, </c><c> /* an int */ </c></r> + <r><c> caller, </c><c> /* the object that made the call out */ </c></r> + <r><c> function, </c><c> /* the function to be called */ </c></r> + <r><c> arg1, </c><c> /* the first argument, if any */ </c></r> + <r><c> arg2, </c><c> /* the second argument, if any */ </c></r> + <r><c> ... </c><c> /* and so on... */ </c></r> + </matrix>   </text></group></dl>})<br/>   </p>   </text>
445:   <text>   <p><tt>capitalize</tt> - capitalize a string</p>    - <tt><p>string capitalize(string str)<br/> + <tt><p>#include &lt;simulate.h&gt;<br/> +    </p> -  + <p>string capitalize(string str)<br/> + </p>   </tt>   <p>Convert the first character in str to upper case, and return the   new string.</p> - </text> +     -  + string</text> +    <group><seealso/><text>   <p><ref resolved='predef::lower_case' to='predef::lower_case'>builtin/lower_case</ref> and <ref resolved='predef::upper_case' to='predef::upper_case'>builtin/upper_case</ref></p>   </text></group>      </doc>   </docgroup> - <docgroup homogen-name='catch' homogen-type='method'> - <method name='catch'/><doc placeholder='true'> + <docgroup homogen-name='cast' homogen-type='method'> + <method name='cast'/><doc placeholder='true'>   <text> - <p><tt>catch</tt> - catch any errors that may occur. - SYNTAX - mixed catch(mixed expr);</p> + <p><tt>cast</tt> - convert one type to another</p>    - <p>Evaluate expr. If there is no error or throw 0 is returned. Otherwise - the value thrown will be returned. Driver errors such as 1/0 will - throw an array where the first index is a string describing the error - and the second the backtrace() at that point.</p> + <tt><p>( <i>type</i> ) <i>expression</i><br/> + </p> + </tt> + <p>Casts convert types, in most cases it just tells the compiler what + type the expression has, but it can also be used to actually convert + the value of the expression into something else. + </p> + <p>Casting from float or int to string will convert the given number + into a decimal ascii string representation. + </p> + <p>Casting from string to float or int will do the opposite. IE. + Read a decimal number from the string and return that. + </p> + <p>Casting from string to program will call cast_to_program in the + master object and request a program to return. The standard master + object will consider the string a file name and compile the program + given by that string. It will then put the program in a chache in + case you cast the same string to a program again later. + </p> + <p>Castring from string to object will call cast_to_object in the + master object and request an object to return. The standard master + object will consider the string a file name, cast it to a program + and return a clone of that file. If the same cast is attempted again + later, the _same_ object will be returned. + </p> + <p>When casting an object, the method o-&gt;cast will be called with a string + with the name of the type as argument. o-&gt;cast can then return any + value. + </p> + <p>In all other cases, casts are just compiler hints.</p>   </text>    -  + <group><example/><text> + <tt><p><matrix> + <r><c> (program)"/precompiled/file" </c><c> // returns the file program </c></r> + <r><c> (object)"/precompiled/file" </c><c> // returns a clone of the file program </c></r> + <r><c> (int)(object)"/precompiled/mpz" // returns 0 </c></r> + </matrix> + </p> + </tt> + pike</text></group> +    <group><seealso/><text> - <p><ref resolved='predef::throw' to='throw'>throw</ref></p> + <p><ref resolved='predef::compile_file' to='compile_file'>compile_file</ref> and <ref resolved='predef::sscanf' to='sscanf'>sscanf</ref></p>   </text></group>      </doc>
498:      </doc>   </docgroup> + <docgroup homogen-name='catch' homogen-type='method'> + <method name='catch'/><doc placeholder='true'> + <text> + <p><tt>catch</tt> - catch errors</p> +  + <tt><p>catch { commands }<br/> + or<br/> + catch ( expression )<br/> + </p> + </tt> + <p>catch traps exceptions such as run time errors or calls to throw() and + returns the argument given to throw. For a run time error, this value + is ({ "error message", backtrace }) </p> +  + control</text> +  + <group><seealso/><text> + <p><ref resolved='predef::throw' to='predef::throw'>builtin/throw</ref></p> + </text></group> +  + </doc> + </docgroup>   <docgroup homogen-name='cd' homogen-type='method'>   <method name='cd'/><doc placeholder='true'>   <text>
506:   <tt><p>int cd(string <i>s</i>);<br/>   </p>   </tt> - <p>Change the current directory for the whole LPC process, return + <p>Change the current directory for the whole Pike process, return   1 for success, 0 otherwise.</p> - </text> +     -  + file</text> +    <group><seealso/><text>   <p><ref resolved='predef::getcwd' to='predef::getcwd'>files/getcwd</ref></p>   </text></group>
526:   </tt>   <p>Return the closest integral value higher or equal to x.   Note that ceil() does _not_ return an int, merely an integral value.</p> - </text> +     -  + float</text> +    <group><seealso/><text>   <p><ref resolved='predef::floor' to='predef::floor'>math/floor</ref></p>   </text></group>      </doc>   </docgroup> -  + <docgroup homogen-name='class' homogen-type='method'> + <method name='class'/><doc placeholder='true'> + <text> + <p><tt>class</tt> - define a inlined program</p> +  + <tt><p>class { program definition }<br/> + </p> + </tt> + <p>Class is a way of writing serveral programs in one file. + The program written between the brackets will be returned by + class.</p> + </text> +  + <group><example/><text> + <tt><p>complex=clone(class { float r, i; });<br/> + complex-&gt;r=1.0;<br/> + complex-&gt;i=1.0;<br/> + </p> + </tt> + pike</text></group> +  + <group><seealso/><text> + <p><ref resolved='predef::inherit' to='inherit'>inherit</ref> and <ref resolved='predef::lambda' to='lambda'>lambda</ref></p> + </text></group> +  + </doc> + </docgroup>   <docgroup homogen-name='clone' homogen-type='method'>   <method name='clone'/><doc placeholder='true'>   <text>
555:      </doc>   </docgroup> - <docgroup homogen-name='code_value' homogen-type='method'> - <method name='code_value'/><doc placeholder='true'> + <docgroup homogen-name='column' homogen-type='method'> + <method name='column'/><doc placeholder='true'>   <text> - <p><tt>code_value</tt> - code a value into a string.</p> + <p><tt>column</tt> - extract a column</p>    - <tt><p>string code_value(mixed <i>v</i>);<br/> + <tt><p>array column(mixed *data,mixed index)<br/>   </p>   </tt> - <p>Return a string that contains an almost readable representation of the value v. + <p>This function is exactly equivialent to:   </p> - <p/> - </text> + <p>map_array(index,lambda(mixed x,mixed y) { return x[y]; },data) + </p> + <p>Except of course it is a lot shorter and faster. + That is, it indexes every index in the array data on the value of + the argument index and returns an array with the results.</p>    -  + array</text> +  + <group><seealso/><text> + <p><ref resolved='predef::rows' to='rows'>rows</ref></p> + </text></group> +    </doc>   </docgroup>   <docgroup homogen-name='combine_path' homogen-type='method'>
591:   &gt; combine_path("/foo/bar","./sune.c");<br/>   Result: /foo/bar/sune.c<br/>   </p> - </tt></text></group> + </tt> + file</text></group>      <group><seealso/><text>   <p><ref resolved='predef::getcwd' to='getcwd'>getcwd</ref></p>
607:   <tt><p>program compile_file(string <i>filename</i>);<br/>   </p>   </tt> - <p>This function will compile the filename to an LPC program that can + <p>This function will compile the filename to an Pike program that can   later be used for cloning.</p>      program</text>
626:   <tt><p>program compile_string(string <i>prog</i>, string <i>name</i>);<br/>   </p>   </tt> - <p>Compile_string takes a complete LPC program as an argument in a the + <p>Compile_string takes a complete Pike program as an argument in a the   string prog and compiles it to clonable program. The second argument   will be used as the file name of the program and will be used for   error messages and such.</p>
639:      </doc>   </docgroup> + <docgroup homogen-name='continue' homogen-type='method'> + <method name='continue'/><doc placeholder='true'> + <text> + <p><tt>continue</tt> - continue a loop</p> +  + <tt><p>continue<br/> + </p> + </tt> + <p>Continue work similarly to break only it does't finish the loop, + it just aborts the rest of this turn in the loop. </p> +  + control</text> +  + <group><seealso/><text> + <p><ref to='do-while'>do-while</ref>, <ref resolved='predef::while' to='while'>while</ref> and <ref resolved='predef::for' to='for'>for</ref></p> + </text></group> +  + </doc> + </docgroup>   <docgroup homogen-name='copy_value' homogen-type='method'>   <method name='copy_value'/><doc placeholder='true'>   <text>
648:   </p>   </tt>   <p>Copy value will copy the value given to it recursively. If the result - value is changed destructively (only possible for lists, arrays and + value is changed destructively (only possible for multisets, arrays and   mappings) the copied value will not be changed. The resulting value   will always be equal to the copied (tested with the efun equal), but   they may not the the same value. (tested with ==)</p>
669:   </p>   </tt>   <p>Return the cosinus value for f.</p> - </text> +     -  + float</text> +    <group><seealso/><text>   <p><ref resolved='predef::acos' to='predef::acos'>math/acos</ref> and <ref resolved='predef::sin' to='predef::sin'>math/sin</ref></p>   </text></group>
696:   </text>      <group><example/><text> - <tt><p><matrix> - <r><c> To crypt a password use: </c></r> - <r><c> </c><c> crypted_password = crypt(typed_password); </c></r> - <r><c> To see if the same password was used again use: </c></r> - <r><c> </c><c> matched = crypt(typed_password, crypted_password); </c></r> - </matrix> + <tt><p>To crypt a password use:<br/> + <dl><group><text>crypted_password = crypt(typed_password);<br/> + </text></group></dl>To see if the same password was used again use:<br/> + <dl><group><text>matched = crypt(typed_password, crypted_password);<br/> + </text></group></dl></p> + </tt> + string</text></group>    - </p> - <p><matrix> - <r><c> </c><c> </c></r> - <r><c> </c></r> - </matrix> - </p> - </tt></text></group> -  +    </doc>   </docgroup>   <docgroup homogen-name='ctime' homogen-type='method'>
742:   <text>   <p><tt>describe_backtrace</tt> - make a backtrace readable</p>    - <tt><p>string describe_backtrace(mixed **<i>backtrace</i>);<br/> + <tt><p>#include &lt;simulate.h&gt;<br/> +    </p> -  + <p>string describe_backtrace(mixed **<i>backtrace</i>);<br/> + </p>   </tt>   <p>Describe backtrace returns a string containing a readable message   that describes where the backtrace was made. The argument 'backtrace'
767:   <p>Destruct marks an object as destructed, all pointers and function   pointers to this object will become zero. The destructed object will   be freed from memory as soon as possible. This will also call - o-&gt;destroyed.</p> + o-&gt;destroy.</p>      object</text>   
777:      </doc>   </docgroup> + <docgroup homogen-name='do-while' homogen-type='method'> + <method name='do-while'/><doc placeholder='true'> + <text> + <p><tt>do-while</tt> - execute a statement while an expression is true</p> +  + <tt><p>do <i>statement</i> while ( <i>expression</i> );<br/> + </p> + </tt> + <p>do - while only differs from the ordinary while-loop in that it does + _not_ evaluate the expression until after the statement has been + executed once. Thus it always runs the statement once.</p> + </text> +  + <group><example/><text> + <tt><p>int i=circular_buffer_pos;<br/> + do<br/> + {<br/> + <dl><group><text>write(circular_buffer[i]);<br/> + i=(i+1) % sizeof(circular_buffer);<br/> + </text></group></dl>}while(i != circular_buffer_pos);<br/> + </p> + </tt> + control</text></group> +  + <group><seealso/><text> + <p><ref to='do-while'>do-while</ref></p> + </text></group> +  + </doc> + </docgroup>   <docgroup homogen-name='equal' homogen-type='method'>   <method name='equal'/><doc placeholder='true'>   <text>
786:   </p>   </tt>   <p>This function checks if the values a and b are equal. For all types but - arrays, lists and mappings, this operation is the same as doing a == b. - For arrays, mappings and lists however, their contents are checked + arrays, multisets and mappings, this operation is the same as doing a == b. + For arrays, mappings and multisets however, their contents are checked   recursively, and if all their contents are the same and in the same   place, they are considered equal.</p>   </text>
807:      </doc>   </docgroup> - <docgroup homogen-name='exec' homogen-type='method'> - <method name='exec'/><doc placeholder='true'> + <docgroup homogen-name='errno' homogen-type='method'> + <method name='errno'/><doc placeholder='true'>   <text> - <p><tt>exec</tt> - execute a program</p> + <p><tt>errno</tt> - return system error number</p>    - <tt><p>int exec(string ... <i>args</i>);<br/> + <tt><p>int errno();<br/>   </p>   </tt> - <p>This function transforms the uLPC process into a process running - the program specified in args. The args will be sent as argv[] to - the new program. This function only returns if something went wrong - during exec(), and in that case it returns zero.</p> + <p>This function returns the system error from the last file operation. + Note that you should normally use the function errno in the file + object instead.</p>   </text>    - <group><note/><text> - <p>The uLPC driver _dies_ when this function is called. You must use - fork() if you wish to execute a program and still run the uLPC - driver.</p> - </text></group> -  - <group><example/><text> - <tt><p>exec("ls","-l");<br/> - </p> - </tt></text></group> -  +    <group><seealso/><text> - <p><ref resolved='predef::fork' to='predef::fork'>files/fork</ref> and <ref resolved='predef::/precompiled/file.pipe' to='file-&gt;pipe'>file-&gt;pipe</ref></p> + <p><ref resolved='predef::/precompiled/file' to='file/errno'>file/errno</ref></p>   </text></group>      </doc>
843:   <text>   <p><tt>exec</tt> - simple way to use exece()</p>    - <tt><p>int exec(string <i>file</i>, string ... <i>args</i>);<br/> + <tt><p>#include &lt;process.h&gt;<br/> +    </p> -  + <p>int exec(string <i>file</i>, string ... <i>args</i>);<br/> + </p>   </tt> - <p>This function destroys the uLPC parser and runs the program + <p>This function destroys the Pike parser and runs the program   'file' instead with the arguments. If no there are no '/' in   the filename, the variable PATH will be consulted when looking   for the program. This function does not return except when
871:   int exece(string <i>file</i>, string *<i>args</i>, mapping(string:string) <i>env</i>);<br/>   </p>   </tt> - <p>This function transforms the uLPC process into a process running + <p>This function transforms the Pike process into a process running   the program specified in the argument 'file' with the argument 'args'.   If the mapping 'env' is present, it will completely replace all   environment variables before the new program is executed.
880:   </text>      <group><note/><text> - <p>The uLPC driver _dies_ when this function is called. You must use - fork() if you wish to execute a program and still run the uLPC + <p>The Pike driver _dies_ when this function is called. You must use + fork() if you wish to execute a program and still run the Pike   driver.</p>   </text></group>   
900:   <docgroup homogen-name='exit' homogen-type='method'>   <method name='exit'/><doc placeholder='true'>   <text> - <p><tt>exit</tt> - exit LPC interpreter</p> + <p><tt>exit</tt> - exit Pike interpreter</p>      <tt><p>void exit(int <i>returncode</i>);<br/>   </p>   </tt> - <p>This function exits the whole 'ulpc' program with the return code + <p>This function exits the whole 'pike' program with the return code   given. Using exit() with any other value than 0 indicates that   something went wrong during execution. See your system manuals for   more information about return codes.
924:   </tt>   <p>Return the natural exponent of f.   log( exp( x ) ) == x as long as exp(x) doesn't overflow an int.</p> - </text> +     -  + float</text> +    <group><seealso/><text>   <p><ref resolved='predef::pow' to='predef::pow'>math/pow</ref> and <ref resolved='predef::log' to='predef::log'>math/log</ref></p>   </text></group>
937:   <text>   <p><tt>explode</tt> - explode a string on a delimeter</p>    - <tt><p>string *explode(string <i>victim</i>, string <i>delimeter</i>);<br/> - or<br/> - victim / delimiter<br/> + <tt><p>#include &lt;simulate.h&gt;<br/> +    </p> -  + <p>string *explode(string <i>victim</i>, string <i>delimeter</i>);<br/> + </p>   </tt>   <p>Explode divides the string called victim at every occurance of   the string delimeter and returns the resulting parts in an array.   If delimeter is an empty string, victim will be divided into strings - of length 1.</p> + of length 1. + </p> + <p>Explode is the same as division.</p>   </text>      <group><example/><text>
962:   string</text></group>      <group><seealso/><text> - <p><ref resolved='predef::implode' to='implode'>implode</ref></p> + <p><ref resolved='predef::implode' to='implode'>implode</ref> and <ref resolved='predef::`/' to='`/'>`/</ref></p>   </text></group>      </doc>
972:   <text>   <p><tt>file_size</tt> - return the size of a file in bytes</p>    - <tt><p>int file_size(string <i>file</i>);<br/> + <tt><p>#include &lt;simulate.h&gt;<br/> +    </p> -  + <p>int file_size(string <i>file</i>);<br/> + </p>   </tt>   <p>Give the size of a file. Size -1 indicates that the file either   does not exist, or that it is not readable by you. Size -2   indicates that it is a directory.</p> - </text> +     -  + file</text> +    <group><seealso/><text>   <p><ref resolved='predef::write_file' to='write_file'>write_file</ref> and <ref resolved='predef::read_bytes' to='read_bytes'>read_bytes</ref></p>   </text></group>
998:   int *file-&gt;stat();<br/>   </p>   </tt> - <p><matrix> - <r><c> file_stat returns an array of integers describing some properties </c></r> - <r><c> about the file. </c><c> Currently file_stat return 5 entries: </c></r> - <r><c> ({ </c></r> + <p>file_stat returns an array of integers describing some properties<br/> + about the file. Currently file_stat return 7 entries:<br/> + ({<br/> + <dl><group><text><matrix> + <r><c> mode, </c><c> /* file mode, protection bits etc. etc. */ </c></r> + <r><c> size, </c><c> /* file size for regular files, -2 for dirs, -3 for links, -4 for otherwise */ </c></r> + <r><c> atime, </c><c> /* last access time */ </c></r> + <r><c> mtime, </c><c> /* last modify time */ </c></r> + <r><c> ctime, </c><c> /* last status time change */ </c></r> + <r><c> uid, </c><c> /* The user who owns this file */ </c></r> + <r><c> gid </c><c> /* The group this file belongs to */ </c></r>   </matrix> - <dl><group><text>mode, /* file mode, protection bits etc. etc. */<br/> - size, /* file size for regular files,<br/> - <dl><group><text>* -2 for dirs,<br/> - * -3 for links,<br/> - * -4 for otherwise<br/> - */<br/> - </text></group></dl>atime, /* last access time */<br/> - mtime, /* last modify time */<br/> - ctime, /* last status time change */<br/> - uid, /* The user who owns this file */<br/> - gid /* The group this file belongs to */<br/> +    </text></group></dl>})<br/>   If you give 1 as a second argument, stat does not follow links.<br/>   You can never get -3 as size if you don't give a second argument.<br/>      </p>   <p>If there is no such file or directory, zero is returned.</p> - </text> +     -  + file</text> +    <group><seealso/><text>   <p><ref resolved='predef::get_dir' to='predef::get_dir'>files/get_dir</ref></p>   </text></group>      </doc>   </docgroup> - <docgroup homogen-name='filter_array' homogen-type='method'> - <method name='filter_array'/><doc placeholder='true'> + <docgroup homogen-name='filter' homogen-type='method'> + <method name='filter'/><doc placeholder='true'>   <text> - <p><tt>filter_array</tt> - filter an array through a function</p> + <p><tt>filter</tt> - filter an array or mapping through a function</p>    - <tt><p>mixed *filter_array(mixed *<i>arr</i>,function <i>fun</i>,mixed ... <i>args</i>);<br/> + <tt><p>#include &lt;array.h&gt;<br/> +  + </p> + <p>mixed *filter(mixed <i>arr</i>,function <i>fun</i>,mixed ... <i>args</i>);<br/>   or<br/> - mixed *filter_array(object *<i>arr</i>,string <i>fun</i>,mixed ... <i>args</i>);<br/> + mixed *filter(object *<i>arr</i>,string <i>fun</i>,mixed ... <i>args</i>);<br/>   or<br/> - mixed *filter_array(function *<i>arr</i>,-<i>1</i>,mixed ... <i>args</i>);<br/> + mixed *filter(function *<i>arr</i>,-<i>1</i>,mixed ... <i>args</i>);<br/>   </p>   </tt>   <p>First syntax:
1051:   <p>Third syntax:   Filter array calls all functionpointers in the array arr, and   return all that returned true.</p> - </text> +     -  + array</text> +    <group><seealso/><text> - <p><ref resolved='predef::sum_arrays' to='sum_arrays'>sum_arrays</ref> and <ref resolved='predef::map_array' to='map_array'>map_array</ref></p> + <p><ref resolved='predef::sum_arrays' to='sum_arrays'>sum_arrays</ref> and <ref resolved='predef::map' to='map'>map</ref></p>   </text></group>      </doc>   </docgroup> -  + <docgroup homogen-name='filter_array' homogen-type='method'> + <method name='filter_array'/><doc placeholder='true'> + <text> + <p><tt>filter_array</tt> - filter an array through a function</p> +  + <tt><p>#include &lt;simulate.h&gt;<br/> +  + </p> + <p>mixed *filter_array(mixed *<i>arr</i>,function <i>fun</i>,mixed ... <i>args</i>);<br/> + or<br/> + mixed *filter_array(object *<i>arr</i>,string <i>fun</i>,mixed ... <i>args</i>);<br/> + or<br/> + mixed *filter_array(function *<i>arr</i>,-<i>1</i>,mixed ... <i>args</i>);<br/> + </p> + </tt> + <p>Filter array is the same function as filter.</p> +  + array</text> +  + <group><seealso/><text> + <p><ref resolved='predef::sum_arrays' to='sum_arrays'>sum_arrays</ref>, <ref resolved='predef::map_array' to='map_array'>map_array</ref> and <ref resolved='predef::filter' to='filter'>filter</ref></p> + </text></group> +  + </doc> + </docgroup>   <docgroup homogen-name='find_call_out' homogen-type='method'>   <method name='find_call_out'/><doc placeholder='true'>   <text>   <p><tt>find_call_out</tt> - find a call out in the queue</p>      <tt><p>int find_call_out(function <i>f</i>);<br/> -  + or<br/> + int find_call_out(mixed <i>id</i>);<br/>   </p>   </tt> - <p>This function searches the call out queue, and returns the time left - to this call out will be done in seconds. If no call is found, + <p>This function searches the call out queue. If given a function as + argument, it looks for the first call out scheduled to that function. + The argument can also be a call out id as returned by call_out, in + which case that call_out will be found. (Unless it has already been + called.) find_call_out will then return how many seconds remains + before that call will be executed. If no call is found,   zero_type(find_call_out(f)) will return 1.</p>   </text>   
1094:   <p>A list of operators that applies to floats follows:   In this list a and b is used to represent a float expression:   </p> - <p>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 &lt; b : returns 1 if a is lesser than b, 0 otherwise - a &lt;= b : returns 1 if a is lesser or equal to b, 0 otherwise - a &gt; b : returns 1 if a is greater than b, 0 otherwise - a &gt;= b : returns 1 if a is greater or equal to b, 0 otherwise</p> + <p><matrix> + <r><c> a + b </c><c> summation </c></r> + <r><c> a - b </c><c> subtraction </c></r> + <r><c> a * b </c><c> multiplication </c></r> + <r><c> a / b </c><c> division </c></r> + <r><c> a % b </c><c> modulo ( same thing as a - floor( a / b ) * b ) </c></r> + <r><c> - a </c><c> negation </c></r> + <r><c> a == b </c><c> return 1 if a is equal to b, 0 otherwise </c></r> + <r><c> a != b </c><c> return 0 if a is equal to b, 1 otherwise </c></r> + <r><c> a &lt; b </c><c> returns 1 if a is lesser than b, 0 otherwise </c></r> + <r><c> a &lt;= b </c><c> returns 1 if a is lesser or equal to b, 0 otherwise </c></r> + <r><c> a &gt; b </c><c> returns 1 if a is greater than b, 0 otherwise </c></r> + <r><c> a &gt;= b </c><c> returns 1 if a is greater or equal to b, 0 otherwise </c></r> + </matrix> + </p>   </text>      <group><note/><text>   <p>floats and ints cannot be used together, they have to be cast   to the same type first.</p> - </text></group> +     -  + types</text></group> +    <group><seealso/><text> - <p><ref resolved='predef::float' to='float'>float</ref> and <ref resolved='predef::' to='predef::'>modules/math</ref></p> + <p><ref resolved='predef::sin' to='predef::sin'>math/sin</ref>, <ref resolved='predef::cos' to='predef::cos'>math/cos</ref>, <ref resolved='predef::tan' to='predef::tan'>math/tan</ref> and <ref resolved='predef::sqrt' to='predef::sqrt'>math/sqrt</ref></p>   </text></group>      </doc>
1132:   float</text>      <group><seealso/><text> - <p><ref resolved='predef::intp' to='intp'>intp</ref>, <ref resolved='predef::programp' to='programp'>programp</ref>, <ref resolved='predef::arrayp' to='arrayp'>arrayp</ref>, <ref resolved='predef::stringp' to='stringp'>stringp</ref>, <ref resolved='predef::objectp' to='objectp'>objectp</ref>, <ref to='regexpp'>regexpp</ref>, <ref resolved='predef::mappingp' to='mappingp'>mappingp</ref>, <ref resolved='predef::listp' to='listp'>listp</ref> and <ref resolved='predef::functionp' to='functionp'>functionp</ref></p> + <p><ref resolved='predef::intp' to='intp'>intp</ref>, <ref resolved='predef::programp' to='programp'>programp</ref>, <ref resolved='predef::arrayp' to='arrayp'>arrayp</ref>, <ref resolved='predef::stringp' to='stringp'>stringp</ref>, <ref resolved='predef::objectp' to='objectp'>objectp</ref>, <ref resolved='predef::mappingp' to='mappingp'>mappingp</ref>, <ref resolved='predef::multisetp' to='multisetp'>multisetp</ref> and <ref resolved='predef::functionp' to='functionp'>functionp</ref></p>   </text></group>      </doc>
1147:   </tt>   <p>Return the closest integral value lower or equal to x.   Note that floor() does _not_ return an int, merely an integral value.</p> - </text> +     -  + float</text> +    <group><seealso/><text>   <p><ref resolved='predef::ceil' to='predef::ceil'>math/ceil</ref></p>   </text></group>      </doc>   </docgroup> -  + <docgroup homogen-name='for' homogen-type='method'> + <method name='for'/><doc placeholder='true'> + <text> + <p><tt>for</tt> - generic loop statement</p> +  + <tt><p>for ( expression1 ; expression2 ; expression3 ) <i>statement</i><br/> + </p> + </tt> + <p>the above statement is exactly equal to: + </p> + <p>expression1;<br/> + while( expression2 )<br/> + {<br/> + <dl><group><text>&lt;statement&gt;<br/> + expression3;<br/> + </text></group></dl>}<br/> +  + </p> + <p>Except when using 'continue'. When using continue in &lt;statement&gt; + expresstion3 will not be called.</p> + </text> +  + <group><example/><text> + <tt><p>int e;<br/> + for(e=0;e&lt;10;e++) write(e+"\n");<br/> + </p> + </tt> + control</text></group> +  + <group><seealso/><text> + <p><ref resolved='predef::while' to='while'>while</ref>, <ref resolved='predef::break' to='break'>break</ref> and <ref resolved='predef::continue' to='continue'>continue</ref></p> + </text></group> +  + </doc> + </docgroup> + <docgroup homogen-name='foreach' homogen-type='method'> + <method name='foreach'/><doc placeholder='true'> + <text> + <p><tt>foreach</tt> - loop over an array</p> +  + <tt><p>foreach ( array, variable ) statement<br/> + </p> + </tt> + <p>For each element in array, set variable to that value and execute + 'statement'.</p> + </text> +  + <group><example/><text> + <tt><p>string word;<br/> + foreach( explode(sentence," "), word) foo(word);<br/> + </p> + </tt> + control</text></group> +  + <group><seealso/><text> + <p><ref resolved='predef::for' to='for'>for</ref> and <ref resolved='predef::while' to='while'>while</ref></p> + </text></group> +  + </doc> + </docgroup>   <docgroup homogen-name='fork' homogen-type='method'>   <method name='fork'/><doc placeholder='true'>   <text>
1192:   If the object the functionpointer is in is destructed the pointer will   become 0. If you try to call a functionpointer that has is 0 then 0   will be returned.</p> - </text> +     -  + types</text> +    <group><seealso/><text>   <p><ref resolved='predef::object' to='object'>object</ref>, <ref resolved='predef::call_function' to='predef::call_function'>builtin/call_function</ref>, <ref resolved='predef::functionp' to='predef::functionp'>builtin/functionp</ref>, <ref resolved='predef::function_object' to='predef::function_object'>builtin/function_object</ref> and <ref resolved='predef::function_name' to='predef::function_name'>builtin/function_name</ref></p>   </text></group>
1252:   function</text>      <group><seealso/><text> - <p><ref resolved='predef::intp' to='intp'>intp</ref>, <ref resolved='predef::programp' to='programp'>programp</ref>, <ref resolved='predef::arrayp' to='arrayp'>arrayp</ref>, <ref resolved='predef::stringp' to='stringp'>stringp</ref>, <ref resolved='predef::objectp' to='objectp'>objectp</ref>, <ref to='regexpp'>regexpp</ref>, <ref resolved='predef::mappingp' to='mappingp'>mappingp</ref>, <ref resolved='predef::listp' to='listp'>listp</ref> and <ref resolved='predef::floatp' to='floatp'>floatp</ref></p> + <p><ref resolved='predef::intp' to='intp'>intp</ref>, <ref resolved='predef::programp' to='programp'>programp</ref>, <ref resolved='predef::arrayp' to='arrayp'>arrayp</ref>, <ref resolved='predef::stringp' to='stringp'>stringp</ref>, <ref resolved='predef::objectp' to='objectp'>objectp</ref>, <ref resolved='predef::mappingp' to='mappingp'>mappingp</ref>, <ref resolved='predef::multisetp' to='multisetp'>multisetp</ref> and <ref resolved='predef::floatp' to='floatp'>floatp</ref></p>   </text></group>      </doc>   </docgroup> -  + <docgroup homogen-name='functions' homogen-type='method'> + <method name='functions'/><doc placeholder='true'> + <text> + <p><tt>functions</tt> - how to write a function</p> +  + <tt><p>modifier type function_name (argument_specification)<br/> + {<br/> + <dl><group><text>/* function body */<br/> + </text></group></dl>}<br/> + </p> + </tt> + <p>A function is basically a piece of code which takes some data + does some things, and hands some data back. Data sent to a + a function is called an 'argument'. + </p> + <p>This defines a function called 'function_name' returning the type + 'type'. The argument_specification is a comma separated list of + arguments. Each argument is specified with a type, whitespace and + the name of the argument. The last argument may have ... before + the name to indicate that that argument shall contain an array of + the rest of the arguments given by the caller. Note that using + ... automatically makes an the variable an array, so writing + </p> + <p><matrix> + <r><c> </c><c> int foo(int * ... ints); </c></r> + <r><c> </c></r> + </matrix> +  + </p> + <p>means that 'ints' is an array of arrays of integers. Which might not + be what you want. + </p> + <p>The modifiers can be zero or more of: static, no_mask, varargs, inline + and private. Varargs means that it is ok to call the function with + less arguments that would otherwise be needed. Inline means that + the function may be inlined in other code. Inline also makes the + function no_mask. Static means that the function can not be called + from other objects. Private means that the function can not be accessed + from programs that inherits this program. + </p> + <p>Some times you need to use a function before it is defined, then you + can write a 'forward declaration' of the function. This is done by + copying the function definition up until (but not including) the '{' + and putting a semicolon after it. The forward declaration should be + put before the use of the function of course. + </p> + <p>Function definitions and forward declarations are toplevel constructs, + they can not be written inside functions or expressions.</p> + </text> +  + <group><example/><text> + <tt><p>/* Forward declare foobar as taking an array of int as argument <br/> + <dl><group><text>*and returning an int<br/> + */<br/> + </text></group></dl>static int foobar(int *a);<br/> +  + </p> + <p>/* This function takes a format string and any number of integers<br/> + <dl><group><text>* as argument and returns a string<br/> + */<br/> + </text></group></dl>string dofobar(string format ,int ... rest)<br/> + {<br/> + <dl><group><text>return sprintf(format, foobar(rest));<br/> + </text></group></dl>}<br/> +  + </p> + <p>/* Define foobar */<br/> + static int foobar(int *a)<br/> + {<br/> + <dl><group><text>int e, ret;<br/> + ret=1;<br/> + </text></group></dl> + </p> + <p><dl><group><text>for(e=0;e&lt;sizeof(a);e++)<br/> + <dl><group><text>ret*=a[e];<br/> + </text></group></dl></text></group></dl> + </p> + <p><dl><group><text>return ret;<br/> + </text></group></dl>}<br/> + </p> + </tt> + pike</text></group> +  + <group><seealso/><text> + <p><ref resolved='predef::lambda' to='lambda'>lambda</ref>, <ref resolved='predef::return' to='return'>return</ref> and <ref resolved='predef::modifier' to='modifier'>modifier</ref></p> + </text></group> +  + </doc> + </docgroup> + <docgroup homogen-name='gauge' homogen-type='method'> + <method name='gauge'/><doc placeholder='true'> + <text> + <p><tt>gauge</tt> - measure system time</p> +  + <tt><p>gauge { commands }<br/> + or<br/> + gauge ( expression )<br/> + </p> + </tt> + <p>Gauge measure how much cpu time is used to execute the commands + given as arguments. The number of milliseconds used is returned + as an integer.</p> + </text> +  + <group><seealso/><text> + <p><ref resolved='predef::catch' to='catch'>catch</ref> and <ref resolved='predef::rusage' to='predef::rusage'>builtin/rusage</ref></p> + </text></group> +  + </doc> + </docgroup> + <docgroup homogen-name='gc' homogen-type='method'> + <method name='gc'/><doc placeholder='true'> + <text> + <p><tt>gc</tt> - do garbage collection</p> +  + <tt><p>int gc();<br/> + </p> + </tt> + <p><matrix> + <r><c> This function checks all the memory for cyclic structures such </c></r> + <r><c> as arrays containing themselves and frees them if approperiate. </c></r> + <r><c> It also frees up destructed objects. It then returns how many </c></r> + <r><c> arrays/objects/programs/etc. it managed </c><c> to free by doing this. </c></r> + <r><c> Normally there is no need to call this function since Pike will </c></r> + <r><c> call it by itself every now and then. (Pike will try to predict </c></r> + <r><c> when 20% of all arrays/object/programs in memory is 'garbage' </c></r> + <r><c> and call this routine then.) </c></r> + </matrix> +  + </p> + <p/> + </text> +  + </doc> + </docgroup>   <docgroup homogen-name='get_dir' homogen-type='method'>   <method name='get_dir'/><doc placeholder='true'>   <text>
1267:   </tt>   <p>Return an array of all filenames in the directory dir, or zero if   no such directory exists.</p> - </text> +     -  + file</text> +    <group><seealso/><text>   <p><ref resolved='predef::mkdir' to='predef::mkdir'>files/mkdir</ref> and <ref resolved='predef::cd' to='predef::cd'>files/cd</ref></p>   </text></group>
1280:   <text>   <p><tt>get_function</tt> - fetch a function from an object</p>    - <tt><p>function get_function(object <i>o</i>, string <i>name</i>);<br/> + <tt><p>#include &lt;simulate.h&gt;<br/> +    </p> - </tt> - <p>Defined as: return o[name]; + <p>function get_function(object <i>o</i>, string <i>name</i>);<br/>   </p> - </text> + </tt> + <p>Defined as: return o[name];</p>    -  + function</text> +    </doc>   </docgroup>   <docgroup homogen-name='getcwd' homogen-type='method'>
1298:   </p>   </tt>   <p>getcwd returns the current working directory.</p> - </text> +     -  + file</text> +    <group><seealso/><text>   <p><ref resolved='predef::cd' to='predef::cd'>files/cd</ref></p>   </text></group>
1343:      </doc>   </docgroup> + <docgroup homogen-name='glob' homogen-type='method'> + <method name='glob'/><doc placeholder='true'> + <text> + <p><tt>glob</tt> - match strings against globs</p> +  + <tt><p>int glob(string <i>glob</i>, string <i>str</i>);<br/> + or<br/> + string *glob(string <i>glob</i>, string *<i>arr</i>);<br/> + </p> + </tt> + <p>This function matches "globs". A in the glob string a question sign + matches any character and an asterisk matches any string. When + given two strings as argument a true/false value is returned + which reflects if the 'str' matches 'glob'. When given an array as + second argument, an array containing all matching strings is returned.</p> + </text> +  + <group><seealso/><text> + <p><ref resolved='predef::sscanf' to='sscanf'>sscanf</ref> and <ref resolved='predef::regexp' to='regexp'>regexp</ref></p> + </text></group> +  + </doc> + </docgroup>   <docgroup homogen-name='hash' homogen-type='method'>   <method name='hash'/><doc placeholder='true'>   <text>
1364:   <docgroup homogen-name='hilfe' homogen-type='method'>   <method name='hilfe'/><doc placeholder='true'>   <text> - <p><tt>hilfe</tt> - Hubbe's Incremental LPC FrontEnd</p> + <p><tt>hilfe</tt> - Hubbe's Incremental Pike FrontEnd</p>      <tt><p>$ hilfe<br/>   or<br/> - $ ulpc -Cstay hilfe<br/> + $ pike -Cstay hilfe<br/>   </p>   </tt> - <p>Hilfe is a LPC-script that supplies an incremental environment for - LPC. It allowes you to evaluate LPC 'on the fly'. If you're running + <p>Hilfe is a Pike-script that supplies an incremental environment for + Pike. It allowes you to evaluate Pike 'on the fly'. If you're running   UNIX, you only have to write 'hilfe' to start it, otherwise you will   have to write 'driver -Cstay hilfe' to run it. If you don't know what   'incremeantal' means in this context, ask you local LISP junkie.
1384:   dump - dump all current variables   . - clear input buffer   </p> - <p>Hilfe parses a subset of LPC, there many things it doesn't handle. Here + <p>Hilfe parses a subset of Pike, there many things it doesn't handle. Here   is a list of what you can do:   </p>   <p>Define a function:
1400:   therefor all global variables are declared as mixed, whatever the   &lt;type&gt; may be.   </p> - <p><matrix> - <r><c> Evaluate a statement: </c></r> - <r><c> &lt;statement&gt; ; </c></r> - <r><c> Statements include the following examples: </c></r> - <r><c> </c><c> for(e=0;e&lt;10;e++) ; e=10; </c></r> - </matrix> -  + <p>Evaluate a statement: + &lt;statement&gt; ; + Statements include the following examples:   </p> - <p><matrix> - <r><c> </c><c> write(e); </c></r> - <r><c> </c></r> - </matrix> -  + <p><dl><group><text>for(e=0;e&lt;10;e++) ;<br/> + </text></group></dl>   </p> - <p><matrix> - <r><c> </c><c> if(foo) return bar; else return gazonk; </c></r> - <r><c> </c></r> - </matrix> -  + <p><dl><group><text>e=10;<br/> + </text></group></dl>   </p> -  + <p><dl><group><text>write(e);<br/> + </text></group></dl> + </p> + <p><dl><group><text>if(foo) return bar; else return gazonk;<br/> + </text></group></dl> + </p>   <p>Statements beginning with for, while, switch, if, do or return will - not automatically return anything, and no result will be printed.</p> + not automatically return anything, and no result will be printed. + </p>   </text>    -  + </doc> + </docgroup> + <docgroup homogen-name='if-else' homogen-type='method'> + <method name='if-else'/><doc placeholder='true'> + <text> + <p><tt>if-else</tt> - run on condition</p> +  + <tt><p>if( expression ) <i>statement</i><br/> + or<br/> + if( expression ) <i>statement</i> else <i>statement</i><br/> + </p> + </tt> + <p>If is the simplest of all control structures, in the first form + it runs the statement if the expression is true and in the second + form it runs the first statement if the expression is true and the + second if it is false.</p> +  + control</text> +    <group><seealso/><text> - <p><ref to='script_mode'>script_mode</ref></p> + <p><ref resolved='predef::switch' to='switch'>switch</ref></p>   </text></group>      </doc>
1435:   <text>   <p><tt>implode</tt> - implode an array of strings</p>    - <tt><p>string implode(string *<i>a</i>, string <i>delimeter</i>);<br/> + <tt><p>#include &lt;simulate.h&gt;<br/> +  + </p> + <p>string implode(string *<i>a</i>, string <i>delimeter</i>);<br/>   or<br/>   a * delimeter<br/>   </p>   </tt>   <p>This function is the inverse of explode. It contatenates all the - strings in a with a delimeter in between each. If no delimeter is - given, an empty string will be used.</p> + strings in a with a delimeter in between each. + </p> + <p>This function is the same as multiplication.</p>   </text>      <group><example/><text>   <tt><p>&gt; implode( ({ "foo","bar","gazonk"}), "-" );<br/>   Result: foo-bar-gazonk<br/> - &gt; implode( ({ "f","o","o" }) );<br/> - Result: foo<br/> +    &gt; ({ "a","b","c" })*" and ";<br/>   Result: a and b and c<br/>   &gt; <br/>
1463:      </doc>   </docgroup> + <docgroup homogen-name='index' homogen-type='method'> + <method name='index'/><doc placeholder='true'> + <text> + <p><tt>index</tt> - get/set an element in an array/string/mapping/object</p> +  + <tt><p>a [ b ]<br/> + or<br/> + a [ b ] = c<br/> + or<br/> + a -&gt; b<br/> + </p> + </tt> + <p><matrix> + <r><c> This operator does a lookup in 'a' to find the element named 'b' in </c></r> + <r><c> 'a'. The last syntax (a-&gt;b) is equal to a [ "b" ]. Different usage </c></r> + <r><c> applies </c><c> to different types. </c></r> + </matrix> +  + </p> + <p><matrix> + <r><c> Strings </c><c> With strings, the index operator can only be used to get values </c></r> + <r><c> </c><c> not change them. The index must be an integer, and the return value will be the ascii value of the corresponding character in the string. The first character is numbered 0. </c></r> + <r><c> Arrays </c><c> As with strings, arrays can only be indexed on integers. However, values can also be changed by using indexing on the left side of an assignment. The values in the array can have any type. As with strings, the first index is 0. </c></r> + <r><c> Mappings </c><c> Mappings can be indexed on any type of value, quite often they are indexed on strings. Values can be changed as with arrays. Mappings do not have a fixed size, nor do they have a specific order in which the values are stored. If you attempt to set a value in a mapping that does not already exists, the mapping will grow to include the new value. There is no 'first' index for mappings. </c></r> + <r><c> Multisets </c><c> Multisets can be also be indexed on any value, but the return value only reflects a true/false status depending on weather that index was present in the multiset. As with mappings, multisets will grow when you try to set a value in it that is does not already exists. However multisets will only grow if the inserted 'c' is nonzero. </c></r> + <r><c> Object </c><c> Objects can only be indexed on strings. It then gets/sets the value of the variable with that name. If the 'variable' isn't a variable at all, but a function it will return a pointer to that function but you can't change it. </c></r> + </matrix> + </p> + </text> +  + <group><example/><text> + <tt><p><matrix> + <r><c> "foobar"[2] </c><c> returns 111 /* ascii for 'o' */ </c></r> + <r><c> "foobar"[0] </c><c> returns 102 /* ascii for 'f' */ </c></r> + <r><c> ({1,2,3})[1] </c><c> returns 2 </c></r> + <r><c> ([1:2})[1] </c><c> returns 2 </c></r> + <r><c> (&lt;1,2,3&gt;)[2] </c><c> returns 1 </c></r> + </matrix> + </p> + </tt> + operators</text></group> +  + <group><seealso/><text> + <p><ref resolved='predef::index' to='index'>index</ref></p> + </text></group> +  + </doc> + </docgroup>   <docgroup homogen-name='indices' homogen-type='method'>   <method name='indices'/><doc placeholder='true'>   <text>   <p><tt>indices</tt> - return an array of all index possible for a value</p>    - <tt><p>mixed *indices(string|array|mapping|list|object <i>foo</i>);<br/> + <tt><p>mixed *indices(string|array|mapping|multiset|object <i>foo</i>);<br/>   </p>   </tt>   <p>Indices returns an array of all values you can use as index when   indexing foo. For strings and arrays this is simply an array of the - ascending numbers. For mappings and lists, the array may contain any + ascending numbers. For mappings and multisets, the array may contain any   kind of value. For objects, the result is an array of strings.</p>    - mapping and list</text> + mapping and multiset</text>      <group><seealso/><text>   <p><ref resolved='predef::values' to='values'>values</ref></p>
1484:      </doc>   </docgroup> + <docgroup homogen-name='inherit' homogen-type='method'> + <method name='inherit'/><doc placeholder='true'> + <text> + <p><tt>inherit</tt> - use definitions from another program</p> +  + <tt><p>inherit "&lt;program name&gt;";<br/> + or<br/> + inherit "&lt;program name&gt;" : local_name;<br/> + </p> + </tt> + <p><matrix> + <r><c> Inherit copies the global identifiers (functions and global variables) </c></r> + <r><c> from the named program. These functions and variables can then be </c></r> + <r><c> used as </c><c> if they were defined in this program. All the inherited </c></r> + <r><c> identifiers that was no declared as no_mask in the inherited program </c></r> + <r><c> can be also be redefined. The redefinition will not only </c></r> + <r><c> affect functions following the redefinition, but all functions in </c></r> + <r><c> this program, including the inherited ones. </c></r> + </matrix> +  + </p> + <p>Even if an identifier is redefined you can still access the original + though. Prepending the identifier name with :: will return the original + identifier, OR an array of all inherited identifiers with that name. + </p> + <p>You can also use the local_name to access a specific identifier, just + prepend it like 'local_name::identifier'. This will return the named + identifer in the program inherited with the given local_name. If no + local_name was given to inherit , the last part of the path in the + program name will be used as local_name. + </p> + <p>Inherit calls master()-&gt;cast_to_program(&lt;program name&gt;) to get the + program to inherit. For this reason there can be no inherits in the + master object. + </p> + <p>Inherit is not an expression or statement, it is a toplevel construct + and must not be written inside a function body.</p> + </text> +  + <group><example/><text> + <tt><p>/* This is file hworld.pike */<br/> + int hello_world() { write("Hello world.\n"); }<br/> +  + </p> + <p>/* This is the file hello_world.pike */<br/> + inherit "hworld.pike";<br/> + <br/> + int main()<br/> + {<br/> + <dl><group><text>hello_world();<br/> + exit(0);<br/> + </text></group></dl>}<br/> + </p> + </tt> + pike</text></group> +  + <group><seealso/><text> + <p><ref resolved='predef::class' to='class'>class</ref></p> + </text></group> +  + </doc> + </docgroup>   <docgroup homogen-name='int' homogen-type='method'>   <method name='int'/><doc placeholder='true'>   <text>
1501:   </p>   <p>In this list a and b is used to represent an integer expression:   </p> - <p>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 &amp; 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 &lt; b : returns 1 if a is lesser than b, 0 otherwise - a &lt;= b : returns 1 if a is lesser or equal to b, 0 otherwise - a &gt; b : returns 1 if a is greater than b, 0 otherwise - a &gt;= b : returns 1 if a is greater or equal to b, 0 otherwise</p> - </text> + <p><matrix> + <r><c> a + b </c><c> summation </c></r> + <r><c> a - b </c><c> subtraction </c></r> + <r><c> a * b </c><c> multiplication </c></r> + <r><c> a / b </c><c> integer division </c></r> + <r><c> a % b </c><c> modulo ( same thing as a - ( a / b ) * b ) </c></r> + <r><c> a | b </c><c> bitwise or </c></r> + <r><c> a &amp; b </c><c> bitwise and </c></r> + <r><c> a ^ b </c><c> bitwise xor </c></r> + <r><c> ! a </c><c> boolean not, returns 1 if a is zero 0 otherwise </c></r> + <r><c> ~ a </c><c> bitwise complement </c></r> + <r><c> - a </c><c> negation </c></r> + <r><c> a == b </c><c> return 1 if a is equal to b, 0 otherwise </c></r> + <r><c> a != b </c><c> return 0 if a is equal to b, 1 otherwise </c></r> + <r><c> a &lt; b </c><c> returns 1 if a is lesser than b, 0 otherwise </c></r> + <r><c> a &lt;= b </c><c> returns 1 if a is lesser or equal to b, 0 otherwise </c></r> + <r><c> a &gt; b </c><c> returns 1 if a is greater than b, 0 otherwise </c></r> + <r><c> a &gt;= b </c><c> returns 1 if a is greater or equal to b, 0 otherwise </c></r> + </matrix> + </p>    -  + types</text> +    <group><seealso/><text>   <p><ref resolved='predef::float' to='float'>float</ref></p>   </text></group>
1539:   int</text>      <group><seealso/><text> - <p><ref resolved='predef::arrayp' to='arrayp'>arrayp</ref>, <ref resolved='predef::programp' to='programp'>programp</ref>, <ref resolved='predef::floatp' to='floatp'>floatp</ref>, <ref resolved='predef::stringp' to='stringp'>stringp</ref>, <ref resolved='predef::objectp' to='objectp'>objectp</ref>, <ref to='regexpp'>regexpp</ref>, <ref resolved='predef::mappingp' to='mappingp'>mappingp</ref>, <ref resolved='predef::listp' to='listp'>listp</ref> and <ref resolved='predef::functionp' to='functionp'>functionp</ref></p> + <p><ref resolved='predef::arrayp' to='arrayp'>arrayp</ref>, <ref resolved='predef::programp' to='programp'>programp</ref>, <ref resolved='predef::floatp' to='floatp'>floatp</ref>, <ref resolved='predef::stringp' to='stringp'>stringp</ref>, <ref resolved='predef::objectp' to='objectp'>objectp</ref>, <ref resolved='predef::mappingp' to='mappingp'>mappingp</ref>, <ref resolved='predef::multisetp' to='multisetp'>multisetp</ref> and <ref resolved='predef::functionp' to='functionp'>functionp</ref></p>   </text></group>      </doc>
1558:   <p>Some signals and their supposed purpose:   </p>   <p><matrix> - <r><c> SIGHUP </c><c> Hangup, sent to process when user logs out </c></r> - <r><c> SIGINT </c><c> Interrupt, normally sent by ctrl-c </c></r> - <r><c> SIGQUIT </c><c> Quit, sent by ctrl-\ </c></r> - <r><c> SIGILL </c><c> Illegal instruction </c></r> - <r><c> SIGTRAP </c><c> Trap, mostly used by debuggers </c></r> - <r><c> SIGABRT </c><c> Aborts process, can be caught, used by uLPC whenever something goes seriously wrong. </c></r> - <r><c> SIGBUS </c><c> Bus error </c></r> - <r><c> SIGFPE </c><c> Floating point error (such as division by zero) </c></r> - <r><c> SIGKILL </c><c> Really kill a process, cannot be caught </c></r> - <r><c> SIGUSR1 </c><c> Signal reserved for whatever you want to use it for. </c></r> - <r><c> SIGSEGV </c><c> Segmentation fault, caused by accessing memory where you shouldn't. Should never happen to uLPC. </c></r> - <r><c> SIGUSR2 </c><c> Signal reserved for whatever you want to use it for. </c></r> - <r><c> SIGALRM </c><c> Signal used for timer interrupts. </c></r> - <r><c> SIGTERM </c><c> Termination signal </c></r> - <r><c> SIGSTKFLT Stack fault </c></r> - <r><c> SIGCHLD </c><c> Child process died </c></r> - <r><c> SIGCONT </c><c> Continue suspended </c></r> - <r><c> SIGSTOP </c><c> Stop process </c></r> - <r><c> SIGSTP </c><c> Suspend process </c></r> - <r><c> SIGTTIN </c><c> tty input for background process </c></r> - <r><c> SIGTTOU </c><c> tty output for background process </c></r> - <r><c> SIGXCPU </c><c> Out of cpu </c></r> - <r><c> SIGXFSZ </c><c> File size limit exceeded </c></r> - <r><c> SIGPROF </c><c> Profile trap </c></r> - <r><c> SIGWINCH Window change signal </c></r> - <r><c> Note that you have to use signame to translate the name of a signal </c></r> - <r><c> to it's number. </c></r> + <r><c> SIGHUP </c><c> Hangup, sent to process when user logs out </c></r> + <r><c> SIGINT </c><c> Interrupt, normally sent by ctrl-c </c></r> + <r><c> SIGQUIT </c><c> Quit, sent by ctrl-\ </c></r> + <r><c> SIGILL </c><c> Illegal instruction </c></r> + <r><c> SIGTRAP </c><c> Trap, mostly used by debuggers </c></r> + <r><c> SIGABRT </c><c> Aborts process, can be caught, used by Pike whenever something goes seriously wrong. </c></r> + <r><c> SIGBUS </c><c> Bus error </c></r> + <r><c> SIGFPE </c><c> Floating point error (such as division by zero) </c></r> + <r><c> SIGKILL </c><c> Really kill a process, cannot be caught </c></r> + <r><c> SIGUSR1 </c><c> Signal reserved for whatever you want to use it for. </c></r> + <r><c> SIGSEGV </c><c> Segmentation fault, caused by accessing memory where you shouldn't. Should never happen to Pike. </c></r> + <r><c> SIGUSR2 </c><c> Signal reserved for whatever you want to use it for. </c></r> + <r><c> SIGALRM </c><c> Signal used for timer interrupts. </c></r> + <r><c> SIGTERM </c><c> Termination signal </c></r> + <r><c> SIGSTKFLT </c><c> Stack fault </c></r> + <r><c> SIGCHLD </c><c> Child process died </c></r> + <r><c> SIGCONT </c><c> Continue suspended </c></r> + <r><c> SIGSTOP </c><c> Stop process </c></r> + <r><c> SIGSTP </c><c> Suspend process </c></r> + <r><c> SIGTTIN </c><c> tty input for background process </c></r> + <r><c> SIGTTOU </c><c> tty output for background process </c></r> + <r><c> SIGXCPU </c><c> Out of cpu </c></r> + <r><c> SIGXFSZ </c><c> File size limit exceeded </c></r> + <r><c> SIGPROF </c><c> Profile trap </c></r> + <r><c> SIGWINCH </c><c> Window change signal </c></r>   </matrix> -  +    </p> -  + <p>Note that you have to use signame to translate the name of a signal + to it's number.</p>   </text>      <group><seealso/><text>
1598:   <docgroup homogen-name='l_sizeof' homogen-type='method'>   <method name='l_sizeof'/><doc placeholder='true'>   <text> - <p><tt>l_sizeof</tt> - Return the size of a list</p> + <p><tt>l_sizeof</tt> - Return the size of a multiset</p>    - <tt><p>int l_sizeof(list <i>m</i>);<br/> + <tt><p>#include &lt;simulate.h&gt;<br/> +    </p> -  + <p>int l_sizeof(multiset <i>m</i>);<br/> + </p>   </tt> - <p>This function is equal to builtin/sizeof.</p> - </text> + <p>This function is equal to sizeof.</p>    -  + multiset</text> +    <group><seealso/><text>   <p><ref resolved='predef::sizeof' to='predef::sizeof'>builtin/sizeof</ref></p>   </text></group>      </doc>   </docgroup> - <docgroup homogen-name='list' homogen-type='method'> - <method name='list'/><doc placeholder='true'> + <docgroup homogen-name='lambda' homogen-type='method'> + <method name='lambda'/><doc placeholder='true'>   <text> - <p><tt>list</tt> - a set of values</p> + <p><tt>lambda</tt> - write nameless functions</p>    - <tt><p>(&lt; 1, 7, 8, 9 &gt;)<br/> + <tt><p>lambda(&lt;argument specifications&gt;) { <i>code</i> }<br/>   </p>   </tt> - <p>A list is basically a mapping without data values, when indexing a - list 1 willl be returned if the index is present, zero otherwise. + <p>Lambda let's you write a function as a value to a function call + or anywhere where you can enter an expression. Using lambda is + basically the same as defining the function before the current + function with a temporary name and then use the name instead.</p> + </text> +  + <group><example/><text> + <tt><p>/* These two lettersort routines are equal */<br/> + string *lettersort(string *words)<br/> + {<br/> + <dl><group><text>return sort_array(lettersort, lambda(string a,string b)<br/> + <dl><group><text>{<br/> + <dl><group><text>return a &lt; b;<br/> + </text></group></dl>});<br/> + </text></group></dl></text></group></dl>}<br/> +    </p> - <p>Here follows a list of operators that applies to lists: - In this list a and b is used to represent a list expression: + <p>int tmp_cmp_fun(string a, string b)<br/> + {<br/> + <dl><group><text>return a &lt; b;<br/> + </text></group></dl>}<br/> +    </p> - <p>a + b : summation ( (&lt;1&gt;) + (&lt;2&gt;) returns (&lt;1,2&gt;) )<br/> - a - b : subtraction, returns a copy of a with all values that are<br/> - <dl><group><text>present in b removed.<br/> - a &amp; b : intersection, return a list with all values that are<br/> - present in both a &amp; b.<br/> - a | b : union, return a list with all values that are present in<br/> - a or b, differs from summation in that values that are<br/> - present in both a and b are only returned once.<br/> - a ^ b : xor, return a list with all indices that are present in<br/> - a or b but not in both.<br/> - a == b : returns 1 if a is the same list as b, same size and values<br/> - is not enough.<br/> - a != b : returns 1 if a is the same list as b, same size and values<br/> - is not enough.<br/> - ! a : boolean not, returns 0<br/> - </text></group></dl><matrix> - <r><c> a[c] : indexing, returns 1 c is present in the list a. </c></r> - <r><c> a[c]=d : setting, if d is true, c is added to the list if it is not </c></r> - <r><c> </c><c> present already. If d is false, it is removed if it is </c></r> - </matrix> - <dl><group><text>present.<br/> - </text></group></dl></p> - </text> + <p>string *lettersort(string *words)<br/> + {<br/> + <dl><group><text>return sort_array(lettersort, tmp_cmp_fun);<br/> + </text></group></dl>}<br/> + </p> + </tt></text></group>    -  + <group><note/><text> + <p>function_name() will return something for lambda functions, + what it returns is unspecified though.</p> + </text></group> +  + <group><bugs/><text> + <p>confuses the hell out of C indent programs</p> +  + pike</text></group> +    <group><seealso/><text> - <p><ref resolved='predef::mapping' to='mapping'>mapping</ref>, <ref resolved='predef::array' to='array'>array</ref>, <ref resolved='predef::indices' to='predef::indices'>builtin/indices</ref> and <ref resolved='predef::sizeof' to='predef::sizeof'>builtin/sizeof</ref></p> + <p><ref resolved='predef::class' to='class'>class</ref> and <ref resolved='predef::function' to='function'>function</ref></p>   </text></group>      </doc>
1659:   <docgroup homogen-name='listp' homogen-type='method'>   <method name='listp'/><doc placeholder='true'>   <text> - <p><tt>listp</tt> - is the argument an list?</p> + <p><tt>listp</tt> - is the argument a list? (multiset)</p>    - <tt><p>int listp(mixed <i>arg</i>);<br/> + <tt><p>#include &lt;simulate.h&gt;<br/> +    </p> -  + <p>int listp(mixed l)<br/> + </p>   </tt> - <p>Returns 1 if arg is a list, zero otherwise.</p> + <p>This function is the same as multisetp.</p> + </text>    - list</text> + <group><seealso/><text> + <p><ref resolved='predef::multisetp' to='predef::multisetp'>builtin/multisetp</ref></p> + </text></group>    -  + </doc> + </docgroup> + <docgroup homogen-name='localtime' homogen-type='method'> + <method name='localtime'/><doc placeholder='true'> + <text> + <p><tt>localtime</tt> - break down time() into intelligible components</p> +  + <tt><p>mapping(string:int) localtime(int <i>time</i>);<br/> + </p> + </tt> + <p>Given a time represented as second since 1970, as returned by the + function time(), this function returns a mapping with the following + components: + </p> + <p><matrix> + <r><c> sec </c><c> seconds over the minute </c><c> 0 - 59 </c></r> + <r><c> min </c><c> minutes over the hour </c><c> 0 - 59 </c></r> + <r><c> hour </c><c> what hour in the day </c><c> 0 - 23 </c></r> + <r><c> mday </c><c> day of the month </c><c> 1 - 31 </c></r> + <r><c> mon </c><c> what month </c><c> 0 - 11 </c></r> + <r><c> year </c><c> years since 1900 </c><c> 0 - </c></r> + <r><c> wday </c><c> day of week (0=sunday) </c><c> 0 - 6 </c></r> + <r><c> yday </c><c> day of year </c><c> 0 - 365 </c></r> + <r><c> isdst </c><c> is daylight saving time </c><c> 0/1 </c></r> + <r><c> timezone </c><c> differance between </c></r> + <r><c> </c><c> </c><c> local time and UTC </c></r> + </matrix> + </p> + </text> +  + <group><note/><text> + <p>The 'timezone' might not be available on all platforms.</p> + </text></group> +    <group><seealso/><text> - <p><ref resolved='predef::intp' to='intp'>intp</ref>, <ref resolved='predef::programp' to='programp'>programp</ref>, <ref resolved='predef::arrayp' to='arrayp'>arrayp</ref>, <ref resolved='predef::stringp' to='stringp'>stringp</ref>, <ref resolved='predef::objectp' to='objectp'>objectp</ref>, <ref to='regexpp'>regexpp</ref>, <ref resolved='predef::mappingp' to='mappingp'>mappingp</ref>, <ref resolved='predef::floatp' to='floatp'>floatp</ref> and <ref resolved='predef::functionp' to='functionp'>functionp</ref></p> + <p><ref resolved='predef::time' to='time'>time</ref></p>   </text></group>      </doc>
1684:   </tt>   <p>Return the natural logarithm of f.   exp( log(x) ) == x for x &gt; 0.</p> - </text> +     -  + float</text> +    <group><seealso/><text>   <p><ref resolved='predef::pow' to='predef::pow'>math/pow</ref> and <ref resolved='predef::exp' to='predef::exp'>math/exp</ref></p>   </text></group>
1737:   <text>   <p><tt>m_indices</tt> - return all indices from a mapping</p>    - <tt><p>mixed *m_indices(mapping <i>m</i>);<br/> + <tt><p>#include &lt;simulate.h&gt;<br/> +    </p> -  + <p>mixed *m_indices(mapping <i>m</i>);<br/> + </p>   </tt> - <p>This function is equal to builtin/indices</p> - </text> + <p>This function is equal to indices</p>    -  + mapping</text> +    <group><seealso/><text>   <p><ref resolved='predef::indices' to='predef::indices'>builtin/indices</ref></p>   </text></group>
1754:   <text>   <p><tt>m_sizeof</tt> - Return the size of a mapping</p>    - <tt><p>int m_sizeof(mapping <i>m</i>);<br/> + <tt><p>#include &lt;simulate.h&gt;<br/> +    </p> -  + <p>int m_sizeof(mapping <i>m</i>);<br/> + </p>   </tt> - <p>This function is equal to builtin/sizeof.</p> - </text> + <p>This function is equal to sizeof.</p>    -  + mapping</text> +    <group><seealso/><text>   <p><ref resolved='predef::sizeof' to='predef::sizeof'>builtin/sizeof</ref></p>   </text></group>
1771:   <text>   <p><tt>m_values</tt> - return all values from a mapping</p>    - <tt><p>mixed *m_values(mapping <i>m</i>);<br/> + <tt><p>#include &lt;simulate.h&gt;<br/> +    </p> -  + <p>mixed *m_values(mapping <i>m</i>);<br/> + </p>   </tt> - <p>This function is equal to builtin/values</p> - </text> + <p>This function is equal to values</p>    -  + mapping</text> +    <group><seealso/><text>   <p><ref resolved='predef::values' to='predef::values'>builtin/values</ref></p>   </text></group>      </doc>   </docgroup> - <docgroup homogen-name='map_array' homogen-type='method'> - <method name='map_array'/><doc placeholder='true'> + <docgroup homogen-name='map' homogen-type='method'> + <method name='map'/><doc placeholder='true'>   <text> - <p><tt>map_array</tt> - map an array over a function</p> + <p><tt>map</tt> - map an array or mapping over a function</p>    - <tt><p>mixed *map_array(mixed *<i>arr</i>,function <i>fun</i>,mixed ... <i>args</i>);<br/> + <tt><p>mixed *map(mixed <i>arr</i>,function <i>fun</i>,mixed ... <i>args</i>);<br/>   or<br/> - mixed *map_array(object *<i>arr</i>,string <i>fun</i>,mixed ... <i>args</i>);<br/> + mixed *map(object *<i>arr</i>,string <i>fun</i>,mixed ... <i>args</i>);<br/>   or<br/> - mixed *map_array(function *<i>arr</i>,-<i>1</i>,mixed ... <i>arg</i>);<br/> + mixed *map(function *<i>arr</i>,-<i>1</i>,mixed ... <i>arg</i>);<br/>   </p>   </tt>   <p>First syntax:
1806:   <p>Third syntax:   Map array calls the functions in the array arr:   arr[x]=arr[x]-&gt;fun(@ args);</p> - </text> +     -  + array</text> +    <group><seealso/><text> - <p><ref resolved='predef::sum_arrays' to='sum_arrays'>sum_arrays</ref> and <ref resolved='predef::filter_array' to='filter_array'>filter_array</ref></p> + <p><ref resolved='predef::sum_arrays' to='sum_arrays'>sum_arrays</ref> and <ref resolved='predef::filter' to='filter'>filter</ref></p>   </text></group>      </doc>   </docgroup> -  + <docgroup homogen-name='map_array' homogen-type='method'> + <method name='map_array'/><doc placeholder='true'> + <text> + <p><tt>map_array</tt> - map an array over a function</p> +  + <tt><p>mixed *map_array(mixed *<i>arr</i>,function <i>fun</i>,mixed ... <i>args</i>);<br/> + or<br/> + mixed *map_array(object *<i>arr</i>,string <i>fun</i>,mixed ... <i>args</i>);<br/> + or<br/> + mixed *map_array(function *<i>arr</i>,-<i>1</i>,mixed ... <i>arg</i>);<br/> + </p> + </tt> + <p>This function is the same as map.</p> +  + array</text> +  + <group><seealso/><text> + <p><ref resolved='predef::filter_array' to='filter_array'>filter_array</ref>, <ref resolved='predef::sum_arrays' to='sum_arrays'>sum_arrays</ref> and <ref resolved='predef::map' to='map'>map</ref></p> + </text></group> +  + </doc> + </docgroup>   <docgroup homogen-name='mapping' homogen-type='method'>   <method name='mapping'/><doc placeholder='true'>   <text>
1833:   <p>Here follows a list of operators that applies to mappings:   In this list a and b is used to represent a mapping expression:   </p> - <p>a + b : summation ( ([1:1]) + ([2:2,2:2]) returns ([1:1,2:2]) )<br/> - a - b : subtraction, returns a copy of a with all pairs whos<br/> - <dl><group><text>index is present in b removed.<br/> - a &amp; b : intersection, return a mapping with all indices that are<br/> - </text></group></dl><matrix> - <r><c> </c><c> present in both a and b, if an index is present in both </c></r> - <r><c> </c></r> + <p><matrix> + <r><c> a + b </c><c> summation ( ([1:1]) + ([2:2,2:2]) returns ([1:1,2:2,2:2]) ) </c></r> + <r><c> a - b </c><c> subtraction, returns a copy of a with all pairs whos index is present in b removed. </c></r> + <r><c> a &amp; b </c><c> intersection, return a mapping with all indices that are resent in both a and b, if an index is present in both a &amp; b the data for that index will be taken from b. </c></r> + <r><c> a | b </c><c> 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. </c></r> + <r><c> a ^ b </c><c> xor, return a mapping with all indices that are present in a or b but not in both. </c></r> + <r><c> a == b </c><c> returns 1 if a is the same mapping as b, same size, indices and values is not enough, 0 otherwise. </c></r> + <r><c> a != b </c><c> returns 0 if a is the same mapping as b, same size, indices and values is not enough, 1 otherwise. </c></r> + <r><c> ! a </c><c> boolean not, returns 0 </c></r> + <r><c> a[c] </c><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) </c></r> + <r><c> a[c]=d </c><c> 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. </c></r>   </matrix> - <dl><group><text>a &amp; b the data for that index will be taken from b.<br/> - a | b : union, return a mapping with all values that are present in<br/> - a or b, differs from summation in that values that are<br/> - present in both a and b are only returned once, as with<br/> - intersection, data will be taken from b when possible.<br/> - a ^ b : xor, return a mapping with all indices that are present in<br/> - a or b but not in both.<br/> - a == b : returns 1 if a is the same mapping as b, same size, indices<br/> - and values is not enough, 0 otherwise.<br/> - a != b : returns 0 if a is the same mapping as b, same size, indices<br/> - and values is not enough, 1 otherwise.<br/> - ! a : boolean not, returns 0<br/> - </text></group></dl>a[c] : indexing, returns the value associated with the value c<br/> - <dl><group><text>in the mapping a. If there is no index c in the mapping<br/> - zero will be returned. (With zero type = 1)<br/> - </text></group></dl>a[c]=d : setting, this associates d with c in the mapping, the index<br/> - <dl><group><text>c will be added to the mapping automatically if it isn't<br/> - already there.<br/> - </text></group></dl></p> - </text> + </p>    -  + types</text> +    <group><seealso/><text> - <p><ref resolved='predef::array' to='array'>array</ref>, <ref resolved='predef::list' to='list'>list</ref>, <ref resolved='predef::sizeof' to='predef::sizeof'>builtin/sizeof</ref>, <ref resolved='predef::indices' to='predef::indices'>builtin/indices</ref> and <ref resolved='predef::values' to='predef::values'>builtin/values</ref></p> + <p><ref resolved='predef::array' to='array'>array</ref>, <ref resolved='predef::multiset' to='multiset'>multiset</ref>, <ref resolved='predef::sizeof' to='predef::sizeof'>builtin/sizeof</ref>, <ref resolved='predef::indices' to='predef::indices'>builtin/indices</ref>, <ref resolved='predef::values' to='predef::values'>builtin/values</ref> and <ref resolved='predef::zero_type' to='predef::zero_type'>builtin/zero_type</ref></p>   </text></group>      </doc>
1881:   mapping</text>      <group><seealso/><text> - <p><ref resolved='predef::intp' to='intp'>intp</ref>, <ref resolved='predef::programp' to='programp'>programp</ref>, <ref resolved='predef::arrayp' to='arrayp'>arrayp</ref>, <ref resolved='predef::stringp' to='stringp'>stringp</ref>, <ref resolved='predef::objectp' to='objectp'>objectp</ref>, <ref to='regexpp'>regexpp</ref>, <ref resolved='predef::listp' to='listp'>listp</ref>, <ref resolved='predef::floatp' to='floatp'>floatp</ref> and <ref resolved='predef::functionp' to='functionp'>functionp</ref></p> + <p><ref resolved='predef::intp' to='intp'>intp</ref>, <ref resolved='predef::programp' to='programp'>programp</ref>, <ref resolved='predef::arrayp' to='arrayp'>arrayp</ref>, <ref resolved='predef::stringp' to='stringp'>stringp</ref>, <ref resolved='predef::objectp' to='objectp'>objectp</ref>, <ref resolved='predef::multisetp' to='multisetp'>multisetp</ref>, <ref resolved='predef::floatp' to='floatp'>floatp</ref> and <ref resolved='predef::functionp' to='functionp'>functionp</ref></p>   </text></group>      </doc>
1894:   <tt><p>object master();<br/>   </p>   </tt> - <p>Master is added by the master object to make it easier to access it. - </p> - </text> + <p>Master is added by the master object to make it easier to access it.</p>    -  + object</text> +    </doc>   </docgroup>   <docgroup homogen-name='member_array' homogen-type='method'>
1905:   <text>   <p><tt>member_array</tt> - find first occurance of a value in an array</p>    - <tt><p>int member_array(mixed <i>item</i>, mixed *<i>arr</i>);<br/> + <tt><p>#include &lt;simulate.h&gt;<br/> +    </p> -  + <p>int member_array(mixed <i>item</i>, mixed *<i>arr</i>);<br/> + </p>   </tt>   <p>Returns the index of the first occurence of item in array arr. - If not found, then -1 is returned. - </p> + If not found, then -1 is returned.</p> +  + array</text> +  + </doc> + </docgroup> + <docgroup homogen-name='mixed' homogen-type='method'> + <method name='mixed'/><doc placeholder='true'> + <text> + <p><tt>mixed</tt> - any type</p> +  + <p>This is not really a type. But this keyword can be used to specify + that a variable, argument or return type can be of any type.</p>   </text>    -  + <group><example/><text> + <tt><p>mixed i=1;<br/> + mixed j="foo";<br/> + mixed foo() { return "bar"; }<br/> + mixed bar() { return ({}); }<br/> + </p> + </tt> + types</text></group> +    </doc>   </docgroup>   <docgroup homogen-name='mkdir' homogen-type='method'>
1924:   </p>   </tt>   <p>Create a directory, return zero if it fails and nonzero if it fails.</p> - </text> +     -  + file</text> +    <group><seealso/><text>   <p><ref resolved='predef::rm' to='predef::rm'>files/rm</ref> and <ref resolved='predef::cd' to='predef::cd'>files/cd</ref></p>   </text></group>
1935:   <docgroup homogen-name='mklist' homogen-type='method'>   <method name='mklist'/><doc placeholder='true'>   <text> - <p><tt>mklist</tt> - make a list</p> + <p><tt>mklist</tt> - make a multiset</p>    - <tt><p>list mklist(mixed *a)<br/> + <tt><p>#include &lt;simulate.h&gt;<br/> +    </p> -  + <p>multiset mklist(mixed *a)<br/> + </p>   </tt> - <p>This function creates a list from an array.</p> + <p>This function creates a multiset from an array.</p>   </text>      <group><example/><text>
1951:   3<br/>   </text></group></dl>&gt;)<br/>   </p> - </tt></text></group> + </tt> + multiset</text></group>      <group><seealso/><text> - <p><ref resolved='predef::aggregate_list' to='predef::aggregate_list'>builtin/aggregate_list</ref></p> + <p><ref resolved='predef::aggregate_multiset' to='predef::aggregate_multiset'>builtin/aggregate_multiset</ref></p>   </text></group>      </doc>
1979:      </doc>   </docgroup> + <docgroup homogen-name='mkmultiset' homogen-type='method'> + <method name='mkmultiset'/><doc placeholder='true'> + <text> + <p><tt>mkmultiset</tt> - make a multiset</p> +  + <tt><p>multiset mkmultiset(mixed *a)<br/> + </p> + </tt> + <p>This function creates a multiset from an array.</p> + </text> +  + <group><example/><text> + <tt><p>&gt; mkmultiset( ({1,2,3}) );<br/> + Result: (&lt; /* 3 elements */<br/> + <dl><group><text>1,<br/> + 2,<br/> + 3<br/> + </text></group></dl>&gt;)<br/> + </p> + </tt> + multiset</text></group> +  + <group><seealso/><text> + <p><ref resolved='predef::aggregate_multiset' to='predef::aggregate_multiset'>builtin/aggregate_multiset</ref></p> + </text></group> +  + </doc> + </docgroup> + <docgroup homogen-name='modifier' homogen-type='method'> + <method name='modifier'/><doc placeholder='true'> + <text> + <p><tt>modifier</tt> - modify function / variable definitions</p> +  + <p>Modifiers makes it possible to give functions and gobal variables + certain characteristics. A list of modifiers follows: + </p> + <p><matrix> + <r><c> static </c><c> make this identifier unavailable by indexing </c></r> + <r><c> inline </c><c> allow inlining this function </c></r> + <r><c> private </c><c> hide this identifier to inheriting programs </c></r> + <r><c> nomask </c><c> don't allow this identifier to be re-defined </c></r> + </matrix> + </p> +  + pike</text> +  + <group><seealso/><text> + <p><ref resolved='predef::functions' to='functions'>functions</ref> and <ref resolved='predef::variables' to='variables'>variables</ref></p> + </text></group> +  + </doc> + </docgroup> + <docgroup homogen-name='multiset' homogen-type='method'> + <method name='multiset'/><doc placeholder='true'> + <text> + <p><tt>multiset</tt> - a set of values</p> +  + <tt><p>(&lt; 1, 7, 8, 9 &gt;)<br/> + </p> + </tt> + <p>A multiset is basically a mapping without data values, when indexing a + multiset 1 willl be returned if the index is present, zero otherwise. + </p> + <p>Here follows a list of operators that applies to multisets: + In this list a and b is used to represent a multiset expression: + </p> + <p><matrix> + <r><c> a + b </c><c> summation ( (&lt;1&gt;) + (&lt;2&gt;) returns (&lt;1,2&gt;) ) </c></r> + <r><c> a - b </c><c> subtraction, returns a copy of a with all values that are present in b removed. </c></r> + <r><c> a &amp; b </c><c> intersection, return a multiset with all values that are present in both a &amp; b. </c></r> + <r><c> a | b </c><c> union, return a multiset 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. </c></r> + <r><c> a ^ b </c><c> xor, return a multiset with all indices that are present in a or b but not in both. </c></r> + <r><c> a == b </c><c> returns 1 if a is the same multiset as b, same size and values is not enough. </c></r> + <r><c> a != b </c><c> returns 1 if a is the same multiset as b, same size and values is not enough. </c></r> + <r><c> ! a </c><c> boolean not, returns 0 </c></r> + <r><c> a[c] </c><c> indexing, returns 1 c is present in the multiset a. </c></r> + <r><c> a[c]=d </c><c> setting, if d is true, c is added to the multiset if it is not present already. If d is false, it is removed if it is present. </c></r> + </matrix> + </p> +  + types</text> +  + <group><seealso/><text> + <p><ref resolved='predef::mapping' to='mapping'>mapping</ref>, <ref resolved='predef::array' to='array'>array</ref>, <ref resolved='predef::indices' to='predef::indices'>builtin/indices</ref> and <ref resolved='predef::sizeof' to='predef::sizeof'>builtin/sizeof</ref></p> + </text></group> +  + </doc> + </docgroup> + <docgroup homogen-name='multisetp' homogen-type='method'> + <method name='multisetp'/><doc placeholder='true'> + <text> + <p><tt>multisetp</tt> - is the argument a multiset?</p> +  + <tt><p>int multisetp(mixed <i>arg</i>);<br/> + </p> + </tt> + <p>Returns 1 if arg is a multiset, zero otherwise.</p> +  + multiset</text> +  + <group><seealso/><text> + <p><ref resolved='predef::intp' to='intp'>intp</ref>, <ref resolved='predef::programp' to='programp'>programp</ref>, <ref resolved='predef::arrayp' to='arrayp'>arrayp</ref>, <ref resolved='predef::stringp' to='stringp'>stringp</ref>, <ref resolved='predef::objectp' to='objectp'>objectp</ref>, <ref resolved='predef::mappingp' to='mappingp'>mappingp</ref>, <ref resolved='predef::floatp' to='floatp'>floatp</ref> and <ref resolved='predef::functionp' to='functionp'>functionp</ref></p> + </text></group> +  + </doc> + </docgroup>   <docgroup homogen-name='mv' homogen-type='method'>   <method name='mv'/><doc placeholder='true'>   <text>
1990:   <p>Rename or move a file between directories. If the destination   file already exists, it will be overwritten. Returns 1 on sucess,   0 otherwise.</p> - </text> +     -  + file</text> +    <group><seealso/><text>   <p><ref resolved='predef::rm' to='predef::rm'>files/rm</ref></p>   </text></group>
2041:   In this list, o and o2 are used to represent object expressions,   and s is a string expression:   </p> - <p>o[s] : indexing, returns the identifier named s in the object o,<br/> - <dl><group><text>an identifier is a global variable or a function.<br/> - </text></group></dl><matrix> - <r><c> o[s]=c : This sets the global variable s int the object o to c, </c></r> - <r><c> </c><c> if s is a function however, an error is produced. </c></r> - <r><c> o -&gt; foo : same as o["foo"] </c></r> - <r><c> o == o2 : return 1 if o and o2 are the same object </c></r> - <r><c> o != o2 : return 0 if o and o2 are the same object </c></r> + <p><matrix> + <r><c> o[s] </c><c> indexing, returns the identifier named s in the object o, </c></r> + <r><c> </c><c> an identifier is a global variable or a function. </c></r> + <r><c> o[s]=c </c><c> This sets the global variable s int the object o to c, if s is a function however, an error is produced. </c></r> + <r><c> o-&gt;foo </c><c> same as o["foo"] </c></r> + <r><c> o == o2 </c><c> return 1 if o and o2 are the same object </c></r> + <r><c> o != o2 </c><c> return 0 if o and o2 are the same object </c></r>   </matrix>   </p> - </text> +     -  + types</text> +    <group><seealso/><text>   <p><ref resolved='predef::program' to='program'>program</ref>, <ref resolved='predef::function' to='function'>function</ref>, <ref resolved='predef::clone' to='predef::clone'>builtin/clone</ref> and <ref resolved='predef::destruct' to='predef::destruct'>builtin/destruct</ref></p>   </text></group>
2090:   object</text>      <group><seealso/><text> - <p><ref resolved='predef::intp' to='intp'>intp</ref>, <ref resolved='predef::programp' to='programp'>programp</ref>, <ref resolved='predef::floatp' to='floatp'>floatp</ref>, <ref resolved='predef::stringp' to='stringp'>stringp</ref>, <ref resolved='predef::arrayp' to='arrayp'>arrayp</ref>, <ref to='regexpp'>regexpp</ref>, <ref resolved='predef::mappingp' to='mappingp'>mappingp</ref>, <ref resolved='predef::listp' to='listp'>listp</ref> and <ref resolved='predef::functionp' to='functionp'>functionp</ref></p> + <p><ref resolved='predef::intp' to='intp'>intp</ref>, <ref resolved='predef::programp' to='programp'>programp</ref>, <ref resolved='predef::floatp' to='floatp'>floatp</ref>, <ref resolved='predef::stringp' to='stringp'>stringp</ref>, <ref resolved='predef::arrayp' to='arrayp'>arrayp</ref>, <ref resolved='predef::mappingp' to='mappingp'>mappingp</ref>, <ref resolved='predef::multisetp' to='multisetp'>multisetp</ref> and <ref resolved='predef::functionp' to='functionp'>functionp</ref></p>   </text></group>      </doc>   </docgroup> -  + <docgroup homogen-name='operators' homogen-type='method'> + <method name='operators'/><doc placeholder='true'> + <text> + <p><tt>operators</tt> - arethmics and other stuff</p> +  + <p>Pike has the following operators: + </p> + <p><matrix> + <r><c> a(args) </c><c> function call </c></r> + <r><c> a[b..c] </c><c> range </c></r> + <r><c> a[b] </c><c> index </c></r> + <r><c> --a </c><c> pre decrement </c></r> + <r><c> a-- </c><c> post decrement </c></r> + <r><c> ++a </c><c> pre increment </c></r> + <r><c> a++ </c><c> post increment </c></r> + <r><c> (type)a </c><c> cast </c></r> + <r><c> ~a </c><c> complement </c></r> + <r><c> !a </c><c> not </c></r> + <r><c> -a </c><c> negate </c></r> + <r><c> a/b </c><c> divide </c></r> + <r><c> a%b </c><c> modulo </c></r> + <r><c> a*b </c><c> multiply </c></r> + <r><c> a-b </c><c> subtract </c></r> + <r><c> a+b </c><c> add </c></r> + <r><c> &gt;&gt; </c><c> shift right </c></r> + <r><c> &lt;&lt; </c><c> shift left </c></r> + <r><c> a&gt;b </c><c> greater than? </c></r> + <r><c> a&lt;b </c><c> lesser than? </c></r> + <r><c> a&gt;=b </c><c> greater or equal than? </c></r> + <r><c> a&lt;=b </c><c> lesser or equal than? </c></r> + <r><c> a!=b </c><c> not equal to? </c></r> + <r><c> a==b </c><c> equal to? </c></r> + <r><c> a&amp;b </c><c> intersection </c></r> + <r><c> a^b </c><c> xor (symmetric differance) </c></r> + <r><c> a|b </c><c> union </c></r> + <r><c> a&amp;&amp;b </c><c> logical and </c></r> + <r><c> a||b </c><c> logical or </c></r> + <r><c> a?b:c </c><c> condition </c></r> + <r><c> a=b </c><c> assignment </c></r> + </matrix> +  + </p> + <p>The ones at the top of the list are parsed before operators lower + down on the list. This means that a|b&amp;c means a|(b&amp;c) not (a|b)&amp;c. + Look at the individual pages for fuller explanations of what they do. + </p> + <p>Then there is also the @ "splice" operator which can only be used in + argument lists. + </p> + <p>Arguments to operators are always computed from left to right. + </p> + <p>Many (but not all) of these operators can also be used as by prepending + with a ` sign. For instance `+(a,b) is the same as a+b. These functions + are called "operator functions" and the following are currently + available: + </p> + <p>`== `!= `! `&lt; `&lt;= `&gt; `&gt;= `+ `- `&amp; `| `^ `&lt;&lt; `&gt;&gt; `* `/ `% `~ + </p> + <p>These operator functions are basically "efuns", but beware, if you + re-define the `+ function a+b will also be redefined. + </p> + <p>On top of all this, many operators can also be overloaded. Overloading + an operator lets you specify how operators works on your objects. + To overload an operator you simply put the corresponding operator + function as a method in your object. An example: + </p> + <p>&gt; program nine=class {<br/> + <dl><group><text>int `+(int arg) { return arg+9; }<br/> + </text></group></dl>};<br/> + Result: program<br/> + &gt; clone(nine)+1;<br/> + Result: 10<br/> + &gt;<br/> +  + </p> + <p>This little example defines a program that works almost like the number + nine. As you can see, clone(nine)+1 is the same as clone(nine)-&gt;`+(1) + in this case, and that is the whole point of operator overloading. + Note however that it would not have worked to write 1+clone(nine) + because operator overloading only works if the first argument is the + object with the overloaded function. Well, almost anyway, the operators + &lt;, &gt;, &lt;=, &gt;= can check both sides. In fact, the methods `&lt;= and `&gt;= + will never be called since Pike will translate a&lt;=b to !(a&gt;b). + </p> + <p>These are the operators you can overload: + </p> + <p><matrix> + <r><c> `== </c><c> also overloads `!= </c></r> + <r><c> `! </c><c> This is also used by if-statements to find out if the object in question is 'true' or not. </c></r> + <r><c> `&lt; </c><c> also overloads `&gt;= </c></r> + <r><c> `&gt; </c><c> also overloads `&lt;= </c></r> + <r><c> `+ </c><c> </c></r> + <r><c> `- </c><c> </c></r> + <r><c> `&amp; </c><c> </c></r> + <r><c> `| </c><c> </c></r> + <r><c> `^ </c><c> </c></r> + <r><c> `&lt;&lt; </c><c> </c></r> + <r><c> `&gt;&gt; </c><c> </c></r> + <r><c> `* </c><c> </c></r> + <r><c> `/ </c><c> </c></r> + <r><c> `% </c><c> </c></r> + <r><c> `~ </c><c> </c></r> + </matrix> +  + </p> + <p>If you also define a function __hash to return an integer, which + must be equal for all objects where `== is true you can index mappings + on the contents of your objects rather than on the object itself. + More details about this will come later.</p> + </text> +  + <group><seealso/><text> + <p><ref resolved='predef::operators' to='/precompiled/mpz'>/precompiled/mpz</ref></p> + </text></group> +  + </doc> + </docgroup>   <docgroup homogen-name='perror' homogen-type='method'>   <method name='perror'/><doc placeholder='true'>   <text>   <p><tt>perror</tt> - print error</p>    - <tt><p>void perror(string <i>s</i>);<br/> + <tt><p>#include &lt;stdio.h&gt;<br/> +    </p> - </tt> - <p>Print a message to stderr. Stderr is normally the console, even if - the process output has been redirected to a file or pipe. + <p>void perror(string <i>s</i>);<br/>   </p> - <p> - </p> - </text> + </tt> + <p>This function prints a message to stderr along with a description + of what went wrong if available. It uses the system errno to find + out what went wrong, so it is only applicable to IO errors.</p>    -  + file</text> +  + <group><seealso/><text> + <p><ref resolved='predef::werror' to='werror'>werror</ref></p> + </text></group> +    </doc>   </docgroup>   <docgroup homogen-name='popen' homogen-type='method'>
2117:   <text>   <p><tt>popen</tt> - pipe open</p>    - <tt><p>string popen(string <i>cmd</i>);<br/> + <tt><p>#include &lt;process.h&gt;<br/> +    </p> -  + <p>string popen(string <i>cmd</i>);<br/> + </p>   </tt>   <p>This function runs the command cmd as in a shell and returns the   output. See your unix/C manual for details on popen.
2137:   </p>   </tt>   <p>Return n raised to the power of x.</p> - </text> +     -  + float</text> +    <group><seealso/><text>   <p><ref resolved='predef::exp' to='predef::exp'>math/exp</ref> and <ref resolved='predef::log' to='predef::log'>math/log</ref></p>   </text></group>
2150:   <text>   <p><tt>previous_object</tt> - return the calling object</p>    - <tt><p>object previous_object();<br/> + <tt><p>#include &lt;simulate.h&gt;<br/> +    </p> -  + <p>object previous_object();<br/> + </p>   </tt>   <p>Returns an object pointer to the object that called current function,   if any.</p>
2175:   are == and !=.</p>   </text>    + <group><note/><text> + <p>In Pike the term 'program' is somewhat confusing, becuase it is used + both to reference a complete runnable software package, and to a + structure in Pike containing code.</p> +  + types</text></group> +    <group><seealso/><text>   <p><ref resolved='predef::object' to='object'>object</ref>, <ref resolved='predef::function' to='function'>function</ref>, <ref resolved='predef::compile_file' to='predef::compile_file'>builtin/compile_file</ref>, <ref resolved='predef::compile_string' to='predef::compile_string'>builtin/compile_string</ref> and <ref resolved='predef::clone' to='predef::clone'>builtin/clone</ref></p>   </text></group>
2194:   program</text>      <group><seealso/><text> - <p><ref resolved='predef::intp' to='intp'>intp</ref>, <ref resolved='predef::listp' to='listp'>listp</ref>, <ref resolved='predef::arrayp' to='arrayp'>arrayp</ref>, <ref resolved='predef::stringp' to='stringp'>stringp</ref>, <ref resolved='predef::objectp' to='objectp'>objectp</ref>, <ref to='regexpp'>regexpp</ref>, <ref resolved='predef::mappingp' to='mappingp'>mappingp</ref>, <ref resolved='predef::floatp' to='floatp'>floatp</ref> and <ref resolved='predef::functionp' to='functionp'>functionp</ref></p> + <p><ref resolved='predef::intp' to='intp'>intp</ref>, <ref resolved='predef::multisetp' to='multisetp'>multisetp</ref>, <ref resolved='predef::arrayp' to='arrayp'>arrayp</ref>, <ref resolved='predef::stringp' to='stringp'>stringp</ref>, <ref resolved='predef::objectp' to='objectp'>objectp</ref>, <ref resolved='predef::mappingp' to='mappingp'>mappingp</ref>, <ref resolved='predef::floatp' to='floatp'>floatp</ref> and <ref resolved='predef::functionp' to='functionp'>functionp</ref></p>   </text></group>      </doc>   </docgroup> -  + <docgroup homogen-name='putenv' homogen-type='method'> + <method name='putenv'/><doc placeholder='true'> + <text> + <p><tt>putenv</tt> - put environment variable</p> +  + <tt><p>void putenv(string <i>varname</i>, string <i>value</i>);<br/> + </p> + </tt> + <p>This function sets the environment variable 'varname' to 'value'.</p> + </text> +  + <group><seealso/><text> + <p><ref resolved='predef::getenv' to='getenv'>getenv</ref> and <ref resolved='predef::exece' to='exece'>exece</ref></p> + </text></group> +  + </doc> + </docgroup>   <docgroup homogen-name='query_host_name' homogen-type='method'>   <method name='query_host_name'/><doc placeholder='true'>   <text>
2263:   </text>      <group><example/><text> - <tt><p>uLPC v1.0E-13 Running Hilfe v1.2 (Hubbe's Incremental LPC FrontEnd)<br/> + <tt><p>Pike v1.0E-13 Running Hilfe v1.2 (Hubbe's Incremental Pike FrontEnd)<br/>   &gt; random_seed(17);<br/>   Result: 0<br/>   &gt; random(1000);<br/>
2291:      </doc>   </docgroup> + <docgroup homogen-name='range' homogen-type='method'> + <method name='range'/><doc placeholder='true'> + <text> + <p><tt>range</tt> - cut a slice of an array or string</p> +  + <tt><p>a [ b .. c ]<br/> + or<br/> + a [ .. c ]<br/> + or<br/> + a [ b .. ]<br/> + </p> + </tt> + <p>This operator cuts out a piece of an array or string. If a is an array + a[b..c] will return an array containing a[b], a[b+1], a[b+2] to a[c]. + Given a string about the same thing will happen, except the the result + will be a string of course. If b is omitted, everything from the + beginning up to and including c will be included. If c is omitted + the result will include everything from (and including) b to the end.</p> + </text> +  + <group><example/><text> + <tt><p><matrix> + <r><c> "foobar"[0..2] </c><c> returns "foo" </c></r> + <r><c> "foobar"[3..5] </c><c> returns "bar" </c></r> + <r><c> ({1,2,3})[..1] </c><c> returns ({1,2}) </c></r> + <r><c> ({1,2,3})[1..] </c><c> returns ({2,3}) </c></r> + <r><c> ({1,2,3})[..] </c><c> returns ({1,2,3}) </c></r> + </matrix> + </p> + </tt> + operators</text></group> +  + <group><seealso/><text> + <p><ref resolved='predef::index' to='index'>index</ref></p> + </text></group> +  + </doc> + </docgroup>   <docgroup homogen-name='read_bytes' homogen-type='method'>   <method name='read_bytes'/><doc placeholder='true'>   <text>   <p><tt>read_bytes</tt> - read a number of bytes into a string from a file</p>    - <tt><p>string read_bytes(string <i>file</i>,int <i>start</i>,int <i>len</i>);<br/> + <tt><p>#include &lt;simulate.h&gt;<br/> +    </p> -  + <p>string read_bytes(string <i>file</i>,int <i>start</i>,int <i>len</i>);<br/> + </p>   </tt>   <p>Read len number of bytes from file file staring at byte start and   return it as a string.</p> - </text> +     -  + file</text> +    <group><seealso/><text>   <p><ref resolved='predef::write_file' to='write_file'>write_file</ref></p>   </text></group>      </doc>   </docgroup> -  + <docgroup homogen-name='readline' homogen-type='method'> + <method name='readline'/><doc placeholder='true'> + <text> + <p><tt>readline</tt> - read a line from stdin</p> +  + <tt><p>string readline(string <i>prompt</i>);<br/> + </p> + </tt> + <p>This function writes the string 'prompt' and then waits until the + user has entered a line from the keyboard. If the readline library + was available when Pike was compiled the user will have history and + line edithing at his/her disposal when entering the line.</p> + </text> +  + <group><seealso/><text> + <p><ref resolved='predef::/precompiled/file' to='predef::file'>files/file</ref></p> + </text></group> +  + </doc> + </docgroup>   <docgroup homogen-name='regexp' homogen-type='method'>   <method name='regexp'/><doc placeholder='true'>   <text>   <p><tt>regexp</tt> - filter an array through a regexp</p>    - <tt><p>string *regexp(string *<i>arr</i>, string <i>reg</i>);<br/> + <tt><p>#include &lt;simulate.h&gt;<br/> +    </p> -  + <p>string *regexp(string *<i>arr</i>, string <i>reg</i>);<br/> + </p>   </tt>   <p>Return those strings in arr that matches the regexp in reg.</p> - </text> +     -  + string</text> +    <group><seealso/><text>   <p><ref resolved='predef::regexp' to='regexp/regexp'>regexp/regexp</ref></p>   </text></group>
2332:   <p><tt>remove_call_out</tt> - remove a call out from the call out queue</p>      <tt><p>int remove_call_out(function <i>f</i>);<br/> + or<br/> + int remove_call_out(function <i>id</i>);<br/>   </p>   </tt>   <p>This function finds the first call to the function f in the call   out queue and removes it. The time left to that call out will be   returned. If no call out was found, zero_type(remove_call_out(f)) - will return 1.</p> + will return 1. You can also give a call out id as argument. (as + returned by call_out)</p>   </text>      <group><seealso/><text>
2363:   <p>This function can do several kinds replacement operations, the   different syntaxes do different things as follow:   </p> - <p>1) string replace(string s, string from, string to);<br/> - <dl><group><text>When given strings as second and third argument, a copy of<br/> - s with every occurance of 'from' return 'to'.<br/> + <p>string replace(string s, string from, string to); + </p> + <p><dl><group><text>When given strings as second and third argument, a copy of<br/> + s with every occurance of 'from' return 'to' is returned.<br/>   </text></group></dl>   </p> - <p>2) string replace(string s, string *from, string *to);<br/> - <dl><group><text>When given arrays of strings as second and third argument,<br/> + <p>string replace(string s, string *from, string *to); + </p> + <p><dl><group><text>When given arrays of strings as second and third argument,<br/>   every occurance of from[0] in s is replaced by to[0],<br/>   from[1] is replaced by to[1] and so on...<br/>   </text></group></dl>   </p> - <p>3) array replace(array a, mixed from, mixed to);<br/> - 4) mapping replace(mapping a, mixed from, mixed to);<br/> - <dl><group><text>When the first argument is an array or mapping, the values in<br/> + <p><matrix> + <r><c> array replace(array a, mixed from, mixed to); </c><c> </c></r> + <r><c> mapping replace(mapping a, mixed from, mixed to); </c></r> + </matrix> +  + </p> + <p><dl><group><text>When the first argument is an array or mapping, the values in<br/>   a are searched for values equal to from, which are replaced by<br/>   to destructively.<br/>   </text></group></dl></p>
2385:      </doc>   </docgroup> + <docgroup homogen-name='return' homogen-type='method'> + <method name='return'/><doc placeholder='true'> + <text> + <p><tt>return</tt> - return from a function</p> +  + <tt><p>return<br/> + or<br/> + return <i>expression</i><br/> + </p> + </tt> + <p>Return jumps directly out of a function returning the given value to + the calling function. If no expression is given, 0 is returned.</p> +  + control</text> +  + </doc> + </docgroup>   <docgroup homogen-name='reverse' homogen-type='method'>   <method name='reverse'/><doc placeholder='true'>   <text>
2419:   </p>   </tt>   <p>Remove a file or directory, return 0 if it fails. Nonzero otherwise.</p> - </text> +     -  + file</text> +    <group><seealso/><text>   <p><ref resolved='predef::mkdir' to='predef::mkdir'>files/mkdir</ref></p>   </text></group>      </doc>   </docgroup> -  + <docgroup homogen-name='rows' homogen-type='method'> + <method name='rows'/><doc placeholder='true'> + <text> + <p><tt>rows</tt> - select a set of rows from an array</p> +  + <tt><p>array rows(mixed data, mixed *index)<br/> + </p> + </tt> + <p>This function is exactly equivialent to: + </p> + <p>map_array(index,lambda(mixed x,mixed y) { return y[x]; },data) + </p> + <p>Except of course it is a lot shorter and faster. + That is, it indexes data on every index in the array index and + returns an array with the results.</p> +  + array</text> +  + <group><seealso/><text> + <p><ref resolved='predef::column' to='column'>column</ref></p> + </text></group> +  + </doc> + </docgroup>   <docgroup homogen-name='rusage' homogen-type='method'>   <method name='rusage'/><doc placeholder='true'>   <text>
2506:   </text>      <group><note/><text> - <p>This function replaces strstr and member_array from LPC4.</p> + <p>This function replaces strstr and member_array from Pike4.</p>      string, array and mapping</text></group>   
2521:   <text>   <p><tt>search_array</tt> - search for something in an array</p>    - <tt><p>int search_array(mixed *<i>arr</i>,function <i>fun</i>,mixed <i>arg</i>, ...);<br/> + <tt><p>#include &lt;array.h&gt;<br/> +  + </p> + <p>int search_array(mixed *<i>arr</i>,function <i>fun</i>,mixed <i>arg</i>, ...);<br/>   or<br/>   int search_array(object *<i>arr</i>,string <i>fun</i>,mixed <i>arg</i>, ...);<br/>   or<br/>
2531:   <p>search_array works like map_array, only it returns the index of the   first call that returned true instead or returning an array of the   returned values. If no call returns true, -1 is returned.</p> - </text> +     -  + array</text> +    <group><seealso/><text>   <p><ref resolved='predef::sum_arrays' to='sum_arrays'>sum_arrays</ref>, <ref resolved='predef::filter_array' to='filter_array'>filter_array</ref> and <ref resolved='predef::member_array' to='member_array'>member_array</ref></p>   </text></group>
2551:   </tt>   <p>This function allows you to trap a signal and have a function called   when the process receives a signal. Although it IS possible to trap - SIGBUS, SIGSEGV etc. I advice you not to. uLPC should not receive any - such signals and if it does it is because of bugs in the uLPC + SIGBUS, SIGSEGV etc. I advice you not to. Pike should not receive any + such signals and if it does it is because of bugs in the Pike   interperter. And all bugs should be reported, no matter how trifle.   </p>   <p>The callback will receive the signal number as the only argument.   See the document for the function 'kill' for a list of signals.   </p>   <p>If no second argument is given, the signal handler for that signal - is restored to the default handler.</p> + is restored to the default handler. + </p> + <p>If the second argument is zero, the signal will be completely ignored.</p>   </text>      <group><seealso/><text>
2623:   </p>   </tt>   <p>Return the sinus value for f.</p> - </text> +     -  + float</text> +    <group><seealso/><text>   <p><ref resolved='predef::asin' to='predef::asin'>math/asin</ref> and <ref resolved='predef::cos' to='predef::cos'>math/cos</ref></p>   </text></group>
2634:   <docgroup homogen-name='sizeof' homogen-type='method'>   <method name='sizeof'/><doc placeholder='true'>   <text> - <p><tt>sizeof</tt> - return the size of an array, string, list or mapping</p> + <p><tt>sizeof</tt> - return the size of an array, string, multiset or mapping</p>    - <tt><p>int sizeof(string|list|mapping|array <i>a</i>);<br/> + <tt><p>int sizeof(string|multiset|mapping|array|object <i>a</i>);<br/>   </p>   </tt>   <p>This function returns the number of indexes available in the argument   given to it. It replaces older functions like strlen, m_sizeof and   size.</p>    - string, list, mapping and array</text> + string, multiset, mapping and array</text>      </doc>   </docgroup>
2666:      </doc>   </docgroup> + <docgroup homogen-name='sort' homogen-type='method'> + <method name='sort'/><doc placeholder='true'> + <text> + <p><tt>sort</tt> - sort an array destructively</p> +  + <tt><p>mixed *sort(array(mixed) <i>index</i>, array(mixed) ... <i>data</i>);<br/> + </p> + </tt> + <p>This function sorts the array 'index' destructively. That means + that the array itself is changed and returned, no copy is created. + If extra arguments are given, they are supposed to be arrays of the + same size. Each of these arrays will be modified in the same way as + 'index'. Ie. if index 3 is moved to position 0 in 'index' index 3 + will be moved to position 0 in all the other arrays as well. + </p> + <p>Sort can sort strings, integers and floats in ascending order. + Arrays will be sorted first on the first element of each array. + </p> + <p>Sort returns it's first argument.</p> +  + array</text> +  + <group><seealso/><text> + <p><ref resolved='predef::reverse' to='reverse'>reverse</ref></p> + </text></group> +  + </doc> + </docgroup>   <docgroup homogen-name='sort_array' homogen-type='method'>   <method name='sort_array'/><doc placeholder='true'>   <text>   <p><tt>sort_array</tt> - sort an array</p>    - <tt><p>mixed *sort_array(mixed *<i>arr</i>,function <i>fun</i>,mixed ... <i>args</i>);<br/> + <tt><p>#include &lt;array.h&gt;<br/> +    </p> -  + <p>mixed *sort_array(mixed *<i>arr</i>,function <i>fun</i>,mixed ... <i>args</i>);<br/> + </p>   </tt>   <p>The first syntax sorts an array after a compare-function fun   which takes two arguments and should return 1 if the first argument   is larger then the second. The rest of the arguments 'args' will be   sent as 3rd, 4th etc. argument to fun. If fun is omitted, &lt; is unsed   instead.</p> - </text> +     -  + array</text> +    <group><seealso/><text>   <p><ref resolved='predef::map_array' to='map_array'>map_array</ref> and <ref resolved='predef::filter_array' to='filter_array'>filter_array</ref></p>   </text></group>
2692:   <text>   <p><tt>spawn</tt> - spawn a process</p>    - <tt><p>int spawn(string <i>cmd</i>);<br/> + <tt><p>#include &lt;process.h&gt;<br/> +  + </p> + <p>int spawn(string <i>cmd</i>);<br/>   or<br/>   int spawn(string <i>cmd</i>, object <i>stdin</i>);<br/>   or<br/>
2708:   </text>      <group><seealso/><text> - <p><ref resolved='predef::popen' to='popen'>popen</ref>, <ref resolved='predef::fork' to='predef::fork'>files/fork</ref>, <ref resolved='predef::exec' to='predef::exec'>files/exec</ref>, <ref to='predef::files-&gt;pipe'>files/files-&gt;pipe</ref> and <ref to='predef::files-&gt;dup2'>files/files-&gt;dup2</ref></p> + <p><ref resolved='predef::popen' to='popen'>popen</ref>, <ref resolved='predef::fork' to='predef::fork'>files/fork</ref>, <ref resolved='predef::exec' to='predef::exec'>files/exec</ref>, <ref resolved='predef::/precompiled/file.pipe' to='predef::file-&gt;pipe'>files/file-&gt;pipe</ref> and <ref resolved='predef::/precompiled/file.dup2' to='predef::file-&gt;dup2'>files/file-&gt;dup2</ref></p>   </text></group>      </doc>
2723:   </tt>   <p>The format string is a string containing a description of how to   output the data in the rest of the arguments. This string should - generally speaking have one %&lt;modifyers&gt;&lt;operator&gt; (examples: + generally speaking have one %&lt;modifiers&gt;&lt;operator&gt; (examples:   %s, %0d, %-=20s) for each of the rest arguments.   </p> - <p>Modifyers:<br/> - <dl><group><text>0 Zero pad numbers (implies right justification)<br/> - ! Toggle truncation<br/> - ' ' (space) pad positive integers with a space<br/> - + pad positive integers with a plus sign<br/> - - left adjusted within field size (default is right)<br/> - | centered within field size<br/> - = column mode if strings are greater than field size<br/> - / Rough linebreak (break at exactly fieldsize instead of<br/> - <dl><group><text>between words)<br/> - </text></group></dl># table mode, print a list of '\n' separated word<br/> - <dl><group><text>(top-to-bottom order)<br/> - </text></group></dl>$ Inverse table mode (left-to-right order)<br/> - n (where n is a number or *) a number specifies field size<br/> - .n set precision<br/> - :n set field size &amp; precision<br/> - ;n Set column width<br/> - * if n is a * then next argument is used<br/> - 'X' Set a pad string. ' cannot be a part of the pad_string (yet)<br/> - &lt; Use same arg again<br/> - ^ repeat this on every line produced<br/> - @ do this format for each entry in argument array<br/> - &gt; Put the string at the bottom end of column instead of top<br/> - _ Set width to the length of data<br/> - </text></group></dl> + <p>Modifiers:   </p> - <p>Operators:<br/> - <dl><group><text>%% percent<br/> - %d signed decimal int<br/> - %u unsigned decimal int (doesn't really exist in lpc)<br/> - %o unsigned octal int<br/> - %x lowercase unsigned hexadecimal int<br/> - %X uppercase unsigned hexadecimal int<br/> - %c char<br/> - %f float<br/> - %g heruistically chosen representation of float<br/> - %e exponential notation float<br/> - %s string<br/> - %O any type (debug style)<br/> - %n nop<br/> - %t type of argument<br/> - %&lt;modifyers&gt;{format%} do a format for every index in an array.<br/> - </text></group></dl></p> + <p><matrix> + <r><c> 0 </c><c> Zero pad numbers (implies right justification) </c></r> + <r><c> ! </c><c> Toggle truncation </c></r> + <r><c> ' ' (space) </c><c> pad positive integers with a space </c></r> + <r><c> + </c><c> pad positive integers with a plus sign </c></r> + <r><c> - </c><c> left adjusted within field size (default is right) </c></r> + <r><c> | </c><c> centered within field size </c></r> + <r><c> = </c><c> column mode if strings are greater than field size </c></r> + <r><c> / </c><c> Rough linebreak (break at exactly fieldsize instead of between words) </c></r> + <r><c> # </c><c> table mode, print a list of '\n' separated word (top-to-bottom order) </c></r> + <r><c> $ </c><c> Inverse table mode (left-to-right order) </c></r> + <r><c> n </c><c> (where n is a number or *) a number specifies field size </c></r> + <r><c> .n </c><c> set precision </c></r> + <r><c> :n </c><c> set field size &amp; precision </c></r> + <r><c> ;n </c><c> Set column width </c></r> + <r><c> * </c><c> if n is a * then next argument is used </c></r> + <r><c> 'X' </c><c> Set a pad string. ' cannot be a part of the pad_string (yet) </c></r> + <r><c> &lt; </c><c> Use same arg again </c></r> + <r><c> ^ </c><c> repeat this on every line produced </c></r> + <r><c> @ </c><c> do this format for each entry in argument array </c></r> + <r><c> &gt; </c><c> Put the string at the bottom end of column instead of top </c></r> + <r><c> _ </c><c> Set width to the length of data </c></r> + </matrix> +  + </p> + <p>Operators: + </p> + <p><matrix> + <r><c> %% </c><c> percent </c></r> + <r><c> %d </c><c> signed decimal int </c></r> + <r><c> %u </c><c> unsigned decimal int (doesn't really exist in Pike) </c></r> + <r><c> %o </c><c> unsigned octal int </c></r> + <r><c> %x </c><c> lowercase unsigned hexadecimal int </c></r> + <r><c> %X </c><c> uppercase unsigned hexadecimal int </c></r> + <r><c> %c </c><c> char (or short with %2c, %3c gives 3 bytes etc.) </c></r> + <r><c> %f </c><c> float </c></r> + <r><c> %g </c><c> heruistically chosen representation of float </c></r> + <r><c> %e </c><c> exponential notation float </c></r> + <r><c> %s </c><c> string </c></r> + <r><c> %O </c><c> any type (debug style) </c></r> + <r><c> %n </c><c> nop </c></r> + <r><c> %t </c><c> type of argument </c></r> + <r><c> %&lt;modifiers&gt;{format%} </c><c> do a format for every index in an array. </c></r> + </matrix> + </p>   </text>      <group><example/><text> - <tt><p>uLPC v1.0E-95 Running Hilfe v1.2 (Hubbe's Incremental LPC FrontEnd)<br/> + <tt><p>Pike v0.1 Running Hilfe v1.2 (Incremental Pike Frontend)<br/>   &gt; int screen_width=70;<br/>   Result: 70<br/>   &gt; mixed sample;<br/>
2891:   &gt; quit<br/>   Exiting.<br/>   </p> - </tt></text></group> + </tt> + string</text></group>      <group><seealso/><text>   <p><ref resolved='predef::sscanf' to='sscanf'>sscanf</ref></p>
2911:   </tt>   <p>Return the square root of f, or in the second case, the square root   truncated to the closest lower integer.</p> - </text> +     -  + float and int</text> +    <group><seealso/><text>   <p><ref resolved='predef::pow' to='predef::pow'>math/pow</ref>, <ref resolved='predef::log' to='predef::log'>math/log</ref>, <ref resolved='predef::exp' to='predef::exp'>math/exp</ref> and <ref resolved='predef::floor' to='predef::floor'>math/floor</ref></p>   </text></group>
2931:   separated by "%d,%s,%c and %f. Every % corresponds to one of var1,   var2...   </p> - <p>%d gives an integer<br/> - %f gives a float<br/> - %c matches one char but returns an integer<br/> - %s gives a string<br/> - %[set] matches a string containing a given set of characters.<br/> - <dl><group><text>(thos given inside the brackets) %[^set] means any character<br/> - ecept those inside brackets. %[0-9H] means any number or 'H'.<br/> - </text></group></dl> + <p><matrix> + <r><c> %d </c><c> gives an integer </c></r> + <r><c> %o </c><c> gives an octal integer </c></r> + <r><c> %x </c><c> gives a hexadecimal integer </c></r> + <r><c> %D </c><c> gives an integer that is either octal (leading zero), hexadecimal (leading 0x) or decimal. </c></r> + <r><c> %f </c><c> gives a float </c></r> + <r><c> %c </c><c> matches one char and returns it as an integer </c></r> + <r><c> %2c </c><c> matches two chars and returns them as an integer (short) </c></r> + <r><c> %s </c><c> gives a string </c></r> + <r><c> %5s </c><c> gives a string of 5 characters (5 can be any number) </c></r> + <r><c> %[set] </c><c> 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'. </c></r> + </matrix> +    </p>   <p>If a * is put between the percent and the operator, the operator   will not only match it's argument, not assign any variables.
2953:      </doc>   </docgroup> + <docgroup homogen-name='strerror' homogen-type='method'> + <method name='strerror'/><doc placeholder='true'> + <text> + <p><tt>strerror</tt> - return a string describing an error</p> +  + <tt><p>string strerror(int <i>errno</i>);<br/> + </p> + </tt> + <p>This function returns a description of an error code. The error + code is usually obtained from the file-&gt;errno() call.</p> +  + file</text> +  + <group><note/><text> + <p>This function may not be available on all platforms. + </p> + </text></group> +  + </doc> + </docgroup>   <docgroup homogen-name='string' homogen-type='method'>   <method name='string'/><doc placeholder='true'>   <text>
2961:   <tt><p>"foo"<br/>   </p>   </tt> - <p>This type can contain a string, or list of characters, strings can - contain any character, even null characters. Strings are a basic - type in LPC, as opposed to C where strings are represented by an + <p>This type can contan text. ie. a word, a sentence, or a book. Note + that this is not simply the letters A to Z, special characters, + null characters, newlines can all be stored in a string. Any 8-bit + character in fact. Strings are a basic + type in Pike, as opposed to C where strings are represented by an   array of char. This means that you cannot set individual characters   in a string with the index operator for instance. In fact, there are   no functions that alters strings destructively. Also, all strings   are 'shared', that means that if the same string is used in several   places, only one will be stored in memory.   </p> -  + <p>When writing a string in a program, you enclose it in doublequotes. + To write special characters you need to use one of the following + syntaxes: + </p> + <p><matrix> + <r><c> \n </c><c> newline </c></r> + <r><c> \r </c><c> carriage return </c></r> + <r><c> \t </c><c> tab </c></r> + <r><c> \b </c><c> backspace </c></r> + <r><c> \" </c><c> " </c></r> + <r><c> \\ </c><c> \ </c></r> + </matrix> +  + </p>   <p>A list of operators that applies to strings follow:   In this list a and b is used to represent a string expression:   </p> - <p>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 + <p><matrix> + <r><c> a + b </c><c> summation ( "a"+"b" returns "ab") </c></r> + <r><c> a - b </c><c> subtraction ( same as replace(a,b,"") ) </c></r> + <r><c> a / b </c><c> division ( same thing as explode(a,b) ) </c></r> + <r><c> ! a </c><c> boolean not, returns 0 </c></r> + </matrix> +    </p> -  + <p>The following operators compare two string alphabetically: + </p>   <p><matrix> - <r><c> The following operators compare two string alphabetically: </c><c> </c></r> - <r><c> a == b : return 1 if a is equal to b, 0 otherwise </c></r> - <r><c> a != b : return 0 if a is equal to b, 1 otherwise </c></r> - <r><c> a &lt; b : returns 1 if a is lesser than b, 0 otherwise </c></r> - <r><c> a &lt;= b : returns 1 if a is lesser or equal to b, 0 otherwise </c></r> - <r><c> a &gt; b : returns 1 if a is greater than b, 0 otherwise </c></r> - <r><c> a &gt;= b : returns 1 if a is greater or equal to b, 0 otherwise </c></r> + <r><c> a == b </c><c> return 1 if a is equal to b, 0 otherwise </c></r> + <r><c> a != b </c><c> return 0 if a is equal to b, 1 otherwise </c></r> + <r><c> a &lt; b </c><c> returns 1 if a is lesser than b, 0 otherwise </c></r> + <r><c> a &lt;= b </c><c> returns 1 if a is lesser or equal to b, 0 otherwise </c></r> + <r><c> a &gt; b </c><c> returns 1 if a is greater than b, 0 otherwise </c></r> + <r><c> a &gt;= b </c><c> returns 1 if a is greater or equal to b, 0 otherwise </c></r>   </matrix>   </p> - </text> +     -  + types</text> +    <group><seealso/><text>   <p><ref resolved='predef::indices' to='predef::indices'>builtin/indices</ref>, <ref resolved='predef::values' to='predef::values'>builtin/values</ref>, <ref resolved='predef::sscanf' to='predef::sscanf'>builtin/sscanf</ref>, <ref resolved='predef::sprintf' to='predef::sprintf'>builtin/sprintf</ref> and <ref resolved='predef::sizeof' to='predef::sizeof'>builtin/sizeof</ref></p>   </text></group>
3009:   string</text>      <group><seealso/><text> - <p><ref resolved='predef::intp' to='intp'>intp</ref>, <ref resolved='predef::listp' to='listp'>listp</ref>, <ref resolved='predef::arrayp' to='arrayp'>arrayp</ref>, <ref resolved='predef::programp' to='programp'>programp</ref>, <ref resolved='predef::objectp' to='objectp'>objectp</ref>, <ref to='regexpp'>regexpp</ref>, <ref resolved='predef::mappingp' to='mappingp'>mappingp</ref>, <ref resolved='predef::floatp' to='floatp'>floatp</ref> and <ref resolved='predef::functionp' to='functionp'>functionp</ref></p> + <p><ref resolved='predef::intp' to='intp'>intp</ref>, <ref resolved='predef::multisetp' to='multisetp'>multisetp</ref>, <ref resolved='predef::arrayp' to='arrayp'>arrayp</ref>, <ref resolved='predef::programp' to='programp'>programp</ref>, <ref resolved='predef::objectp' to='objectp'>objectp</ref>, <ref resolved='predef::mappingp' to='mappingp'>mappingp</ref>, <ref resolved='predef::floatp' to='floatp'>floatp</ref> and <ref resolved='predef::functionp' to='functionp'>functionp</ref></p>   </text></group>      </doc>
3019:   <text>   <p><tt>strlen</tt> - Return the length of a string</p>    - <tt><p>int strlen(string <i>s</i>);<br/> + <tt><p>#include &lt;simulate.h&gt;<br/> +    </p> -  + <p>int strlen(string <i>s</i>);<br/> + </p>   </tt> - <p>This function is equal to builtin/sizeof.</p> - </text> + <p>This function is equal to sizeof.</p>    -  + string</text> +    <group><seealso/><text>   <p><ref resolved='predef::sizeof' to='predef::sizeof'>builtin/sizeof</ref></p>   </text></group>
3036:   <text>   <p><tt>strstr</tt> - find a string inside a string</p>    - <tt><p>int strstr(string <i>str1</i>,string <i>str2</i>);<br/> + <tt><p>#include &lt;simulate.h&gt;<br/> +    </p> -  + <p>int strstr(string <i>str1</i>,string <i>str2</i>);<br/> + </p>   </tt>   <p>Return the position of str2 in str1, if str2 can't be found in str1   -1 is returned.</p> - </text> +     -  + string</text> +    <group><seealso/><text>   <p><ref resolved='predef::sscanf' to='predef::sscanf'>builtin/sscanf</ref> and <ref resolved='predef::explode' to='predef::explode'>builtin/explode</ref></p>   </text></group>
3054:   <text>   <p><tt>sum</tt> - add values together</p>    - <tt><p>int sum(int ... <i>i</i>);<br/> + <tt><p>#include &lt;simulate.h&gt;<br/> +  + </p> + <p>int sum(int ... <i>i</i>);<br/>   or<br/>   float sum(float ... <i>f</i>);<br/>   or<br/>
3064:   or<br/>   mapping sum(mapping ... <i>m</i>);<br/>   or<br/> - list sum(list ... <i>l</i>);<br/> + list sum(multiset ... <i>l</i>);<br/>   </p>   </tt>   <p>This function does exactly the same thing as adding all the arguments   together with +. It's just here so you can get a function-pointer to   the summation operator.</p>    - int, float, string, array, mapping and list</text> + int, float, string, array, mapping and multiset</text>      </doc>   </docgroup>
3080:   <text>   <p><tt>sum_arrays</tt> - map any number of arrays over a function.</p>    - <tt><p>mixed *sum_arrays(function <i>fun</i>,mixed *<i>arr1</i>,...);<br/> + <tt><p>#include &lt;array.h&gt;<br/> +    </p> -  + <p>mixed *sum_arrays(function <i>fun</i>,mixed *<i>arr1</i>,...);<br/> + </p>   </tt>   <p>Works like this:   </p> - <p><dl><group><text>mixed *sum_arrays(function fun,mixed *arr1,...)<br/> + <p>mixed *sum_arrays(function fun,mixed *arr1,...)<br/>   {<br/>   <dl><group><text>int e;<br/> - </text></group></dl>mixed *res=allocate(sizeof(arr1));<br/> - <dl><group><text>for(e=0;e&lt;sizeof(arr1);e++)<br/> + mixed *res=allocate(sizeof(arr1));<br/> + for(e=0;e&lt;sizeof(arr1);e++)<br/>   {<br/> - </text></group></dl>res[e]=fun(arr1[e],arr2[e],...);<br/> - <dl><group><text>}<br/> - </text></group></dl>return res;<br/> - }<br/> - </text></group></dl> + <dl><group><text>res[e]=fun(arr1[e],arr2[e],...);<br/> + </text></group></dl>}<br/> + return res;<br/> + </text></group></dl>}<br/> +    </p>   <p>Simple ehh?</p> - </text> +     -  + array</text> +    <group><seealso/><text>   <p><ref resolved='predef::map_array' to='map_array'>map_array</ref>, <ref resolved='predef::filter_array' to='filter_array'>filter_array</ref> and <ref resolved='predef::search_array' to='search_array'>search_array</ref></p>   </text></group>      </doc>   </docgroup> -  + <docgroup homogen-name='switch' homogen-type='method'> + <method name='switch'/><doc placeholder='true'> + <text> + <p><tt>switch</tt> - Complicated conditional statement</p> +  + <tt><p>switch( expression )<br/> + {<br/> + <dl><group><text>case constant1:<br/> + <dl><group><text><i>statement1</i><br/> + </text></group></dl></text></group></dl><br/> + <dl><group><text>case constant2:<br/> + <dl><group><text><i>statement2</i><br/> + break;<br/> + </text></group></dl></text></group></dl><br/> + <dl><group><text>case constant3..constant4:<br/> + <dl><group><text><i>statement4</i><br/> + break;<br/> + </text></group></dl></text></group></dl><br/> + <dl><group><text>default:<br/> + <dl><group><text><i>statement3</i><br/> + </text></group></dl></text></group></dl>}<br/> + </p> + </tt> + <p>Switch evaluates the expression give and then executes one or more + statement accordingly to the result. If the result is equal to + constant1 then statement1 will be executed, please observe that + the second case-statement dos _not_ abort the execution in any way + instead statement2 will also be executed. After that break will + cause execution to continue after the after the last } in the + switch statement. If the result is equal to constant2 only + statement2 will be executed. If expression &lt;= consant3 and + expression &gt;= constant4, statement4 will be executed. In all other + cases statement3 is executed because it is 'default'. Please note + that the expression and constants can be any type that can be + written as a constant. Arrays, mappings and multisets have little or + no use though.</p> +  + control</text> +  + <group><seealso/><text> + <p><ref to='if-else'>if-else</ref> and <ref resolved='predef::break' to='break'>break</ref></p> + </text></group> +  + </doc> + </docgroup>   <docgroup homogen-name='system' homogen-type='method'>   <method name='system'/><doc placeholder='true'>   <text>   <p><tt>system</tt> - run an external program</p>    - <tt><p>void system(string <i>cmd</i>);<br/> + <tt><p>#include &lt;process.h&gt;<br/> +    </p> -  + <p>void system(string <i>cmd</i>);<br/> + </p>   </tt>   <p>This function runs the external program cmd and waits until it   is finished. Standard /bin/sh completions/redirectoins/etc. can
3134:   </p>   </tt>   <p>Return the tangent value for f.</p> - </text> +     -  + float</text> +    <group><seealso/><text>   <p><ref resolved='predef::atan' to='predef::atan'>math/atan</ref>, <ref resolved='predef::sin' to='predef::sin'>math/sin</ref> and <ref resolved='predef::cos' to='predef::cos'>math/cos</ref></p>   </text></group>
3147:   <text>   <p><tt>this_function</tt> - return a functionpointer to the current function</p>    - <tt><p>function this_function();<br/> + <tt><p>#include &lt;simulate.h&gt;<br/> +    </p> -  + <p>function this_function();<br/> + </p>   </tt>   <p>Returns a functionpointer to the current function, useful for   making recursive lambda-functions.</p> - </text> +     -  + function</text> +    <group><seealso/><text>   <p><ref resolved='predef::get_function' to='predef::get_function'>builtin/get_function</ref>, <ref resolved='predef::function_name' to='predef::function_name'>builtin/function_name</ref>, <ref resolved='predef::function_object' to='predef::function_object'>builtin/function_object</ref> and <ref resolved='predef::backtrace' to='predef::backtrace'>builtin/backtrace</ref></p>   </text></group>
3210:   The function ctime() converts this integer to a readable string.   </p>   <p>The second syntax does not call the system call time() as often, - but is only updated in the backed. (when lpc code isn't running)</p> + but is only updated in the backed. (when pike code isn't running)</p>   </text>      <group><seealso/><text>
3229:   </tt>   <p>This function affects the debug trace level. (also set by the -t   command line option) The old level is returned. Trace level 1 or - higher means that calls to lpc functions are printed to stderr, + higher means that calls to pike functions are printed to stderr,   level 2 or higer means calls to builtin functions are printed, 3   means every opcode interpreted is printed, 4 means arguments to   these opcodes are printed as well. See the command lines options
3239:      </doc>   </docgroup> + <docgroup homogen-name='typeof' homogen-type='method'> + <method name='typeof'/><doc placeholder='true'> + <text> + <p><tt>typeof</tt> - check return type of expression</p> +  + <tt><p>typeof ( expression )<br/> + </p> + </tt> + <p>This is a not really a function even if it looks like it, it returns + a human readable (almost) representation of the type that the + expression would return without actually evaluating it. + The representation is in the form of a string.</p> + </text> +  + <group><example/><text> + <tt><p>&gt; typeof(`sizeof);<br/> + Result: function(object | mapping | array | multiset | string : int)<br/> + &gt; typeof(sizeof(({})));<br/> + Result: int<br/> + &gt; <br/> + </p> + </tt> + pike</text></group> +  + </doc> + </docgroup> + <docgroup homogen-name='ualarm' homogen-type='method'> + <method name='ualarm'/><doc placeholder='true'> + <text> + <p><tt>ualarm</tt> - set an alarm clock for delivery of a signal</p> +  + <tt><p>int ualarm(int <i>useconds</i>);<br/> + </p> + </tt> + <p>ualarm arranges for a SIGALRM signal to be delivered to the + process in useconds micro seconds. + </p> + <p>If useconds is zero, no new alarm is scheduled. + </p> + <p>In any event any previously set alarm is cancelled.</p> + </text> +  + <group><returns/><text> + <p>ualarm returns the number of microseconds seconds remaining<br/> + <dl><group><text>until any previously scheduled alarm was due to be delivered, or<br/> + </text></group></dl>zero if there was no previously scheduled alarm.<br/> + </p> + </text></group> +  + <group><seealso/><text> + <p><ref resolved='predef::signal' to='signal'>signal</ref></p> + </text></group> +  + </doc> + </docgroup>   <docgroup homogen-name='upper_case' homogen-type='method'>   <method name='upper_case'/><doc placeholder='true'>   <text>
3263:   <text>   <p><tt>values</tt> - return an array of all possible values from indexing</p>    - <tt><p>mixed *values(string|list|mapping|array|object <i>foo</i>);<br/> + <tt><p>mixed *values(string|multiset|mapping|array|object <i>foo</i>);<br/>   </p>   </tt>   <p>Values return an array of all values you can get when indexing the   value foo. For strings, an array of int with the ascii values of the - characters in the string is returned. For a list, an array filled with + characters in the string is returned. For a multiset, an array filled with   ones is return. For mappings, objects and arrays, the returned array   may contain any kind of value.</p>   
3280:      </doc>   </docgroup> + <docgroup homogen-name='variables' homogen-type='method'> + <method name='variables'/><doc placeholder='true'> + <text> + <p><tt>variables</tt> - how to declare a variable</p> +  + <tt><p>modifier type variable_name_list;<br/> + </p> + </tt> + <p>This is how you declare a global variable. Local variables are defined + in the same way, but you may not use any modifiers for local variables. + The variable_name_list is a comma separated list of the variables + to declare as the type 'type'. Note that '*' binds to the variable + names, not the type. This means that: + </p> + <p><matrix> + <r><c> </c><c> int * i,j; </c></r> + <r><c> </c></r> + </matrix> +  + </p> + <p>Declares i as an array of int, but j will be declared as int. To + declare both i and j as arrays of int you have to write. + </p> + <p><matrix> + <r><c> </c><c> int * i, * j; </c></r> + <r><c> </c></r> + </matrix> +  + </p> + <p>or + </p> + <p><matrix> + <r><c> </c><c> array(int) i,j; </c></r> + <r><c> </c></r> + </matrix> +  + </p> + <p>Modifiers can be zero or more of: static, no_mask and private. + Private means that the variable can not be accessed from programs + that inherit this program. Static means that it can not be accessed + from other objects with the index operator. No_mask means that it + can not be redefined in inheriting programs.</p> +  + pike</text> +  + <group><seealso/><text> + <p><ref resolved='predef::functions' to='functions'>functions</ref></p> + </text></group> +  + </doc> + </docgroup>   <docgroup homogen-name='version' homogen-type='method'>   <method name='version'/><doc placeholder='true'>   <text>
3288:   <tt><p>string version();<br/>   </p>   </tt> - <p>This function returns a brief information about the uLPC version.</p> + <p>This function returns a brief information about the Pike version.</p>   </text>      <group><example/><text>   <tt><p>&gt; version();<br/> - Result: uLPC v1.0E-13<br/> + Result: Pike v1.0E-13<br/>   <br/>   </p>   </tt></text></group>      </doc>   </docgroup> -  + <docgroup homogen-name='werror' homogen-type='method'> + <method name='werror'/><doc placeholder='true'> + <text> + <p><tt>werror</tt> - write to stderr</p> +  + <tt><p>void werror(string <i>s</i>);<br/> + </p> + </tt> + <p>Writes a message to stderr. Stderr is normally the console, even if + the process output has been redirected to a file or pipe.</p> +  + file</text> +  + </doc> + </docgroup> + <docgroup homogen-name='while' homogen-type='method'> + <method name='while'/><doc placeholder='true'> + <text> + <p><tt>while</tt> - execute a statement while an expression is true</p> +  + <tt><p>while( expression ) <i>statement</i><br/> + </p> + </tt> + <p>While runns the statement until the expression is false. The + expression is evaluated once for every loop. If the expression is + false the first time the statement is never executed.</p> +  + control</text> +  + <group><seealso/><text> + <p><ref resolved='predef::for' to='for'>for</ref> and <ref to='do-while'>do-while</ref></p> + </text></group> +  + </doc> + </docgroup>   <docgroup homogen-name='write' homogen-type='method'>   <method name='write'/><doc placeholder='true'>   <text>
3313:   </text>      <group><seealso/><text> - <p><ref resolved='predef::perror' to='predef::perror'>builtin/perror</ref></p> + <p><ref resolved='predef::werror' to='predef::werror'>builtin/werror</ref></p>   </text></group>      </doc>
3323:   <text>   <p><tt>write_file</tt> - append a string to a file</p>    - <tt><p>int write_file(string file, string str)<br/> + <tt><p>#include &lt;simulate.h&gt;<br/> +    </p> -  + <p>int write_file(string file, string str)<br/> + </p>   </tt>   <p>Append the string str onto the file file. Returns number of bytes written.</p> - </text> +     -  + file</text> +    <group><seealso/><text> - <p><ref to='read_file'>read_file</ref></p> + <p><ref resolved='predef::read_bytes' to='read_bytes'>read_bytes</ref></p>   </text></group>      </doc>
3351:   will return 1 if there was no such thing present in the mappping, or   no such call_out could be found. Otherwize zero_type will return zero.</p>    - int</text> + int and mapping</text>      <group><seealso/><text>   <p><ref resolved='predef::find_call_out' to='find_call_out'>find_call_out</ref></p>
3359:      </doc>   </docgroup> + <docgroup homogen-name='||' homogen-type='method'> + <method name='||'/><doc placeholder='true'> + <text> + <p><tt>||</tt> - logical or</p> +  + <tt><p>a || b<br/> + </p> + </tt> + <p>This operator does logical 'or' between expressions. It first + evaluates a and returns that if a is non-zero. Otherwise it + returns b. Note that b is not evaluated at all if a is non-zero.</p> +  + operators</text> +  + <group><seealso/><text> + <p><ref resolved='predef::`|' to='`|'>`|</ref> and <ref resolved='predef::||' to='&amp;&amp;'>&amp;&amp;</ref></p> + </text></group> +  + </doc> + </docgroup>   <class name='/precompiled/file'>   <doc placeholder='true'>   <text>   <p><tt>/precompiled/file</tt> - the basic file handling program</p>    - <p>/precompiled/file is a pre-compiled LPC program, written in C. + <p>/precompiled/file is a pre-compiled Pike program, written in C.   It contains the functions need to handle files, sockets, streams - and pipes from within lpc. /precompiled/file is a part of the files + and pipes from within Pike. /precompiled/file is a part of the files   module.   </p>   <p>Here follows the descriptions of the functions in /precompiled/file:
3551:   contain one or more of the following letters:   </p>   <p><matrix> - <r><c> </c><c> 'r' </c><c> : open file for reading </c></r> - <r><c> </c><c> 'w' 'a' 't' 'c' 'x' </c><c> : open file for writing : open file for append (use with 'w') : truncate file at close (use with 'w') : create file if it doesn't exist (use with 'w') : fail if file already exist (use with 'c') </c></r> + <r><c> 'r' </c><c> open file for reading </c></r> + <r><c> 'w' </c><c> open file for writing </c></r> + <r><c> 'a' </c><c> open file for append (use with 'w') </c></r> + <r><c> 't' </c><c> truncate file at close (use with 'w') </c></r> + <r><c> 'c' </c><c> create file if it doesn't exist (use with 'w') </c></r> + <r><c> 'x' </c><c> fail if file already exist (use with 'c') </c></r>   </matrix>      </p>
3722:   <p><tt>read</tt> - read data from a file or stream</p>      <tt><p>string file-&gt;read(int <i>nbytes</i>);<br/> + or<br/> + string file-&gt;read(int <i>nbytes</i>, int <i>notall</i>);<br/>   </p>   </tt>   <p>Read tries to read nbytes bytes from the file, and return it as a - string. If something goes wrong, zero is returned.</p> + string. If something goes wrong, zero is returned. + </p> + <p>If a one is given as second argument to read(), read will not try + it's best to read as many bytes as you asked it to read, it will + merely try to read as many bytes as the system read function will + return. This mainly useful with stream devices which can return + exactly one row or packet at a time.</p>   </text>      <group><seealso/><text>
3795:   </text>      <group><seealso/><text> - <p><ref to='predef::socket'>files/socket</ref> and <ref resolved='predef::/precompiled/port' to='port/accept'>port/accept</ref></p> + <p><ref resolved='predef::/precompiled/file.open_socket' to='file-&gt;open_socket'>file-&gt;open_socket</ref> and <ref resolved='predef::/precompiled/port.accept' to='port-&gt;accept'>port-&gt;accept</ref></p>   </text></group>      </doc>
3850:   <text>   <p><tt>set_nonblocking</tt> - make stream nonblocking</p>    - <tt><p><matrix> - <r><c> void file-&gt;set_nonblocking(function read_callback, </c></r> - <r><c> </c><c> </c><c> function write_callback, function close_callback); </c></r> - </matrix> - </p> + <tt><p>void file-&gt;set_nonblocking(<br/> + <dl><group><text>function read_callback,<br/> + function write_callback,<br/> + function close_callback);<br/> + </text></group></dl></p>   </tt>   <p>This function sets a stream to nonblocking mode. When data arrives on   the stream, read_callback will be called with some or all of this data.
3933:   </doc>   </docgroup>   </class> + <class name='/precompiled/gdbm'> + <doc placeholder='true'> + <text> + <p><tt>/precompiled/gdbm</tt> - database interface</p> +  + <p>This is the an interface to the gdbm library. This module might or + might not be available in your Pike depending on weather gdbm was + available when Pike was compiled. + </p> + <p>A gdbm database has essentially the same functionality as a mapping, + except the syntax is different, and it is located on disk, not in + memory. Each gdbm database is one file which contains a set of + key-value pairs. Both keys and values are strings and all keys are + unique. + </p> + <p/> + </text> +  + </doc> + <docgroup homogen-name='close' homogen-type='method'> + <method name='close'> + </method> + <doc placeholder='true'> + <text> + <p><tt>close</tt> - close database</p> +  + <tt><p>void gdbm-&gt;close();<br/> + </p> + </tt> + <p>This closes the database. + </p> + <p/> + </text> +  + </doc> + </docgroup> + <docgroup homogen-name='create' homogen-type='method'> + <method name='create'> + </method> + <doc placeholder='true'> + <text> + <p><tt>create</tt> - open database</p> +  + <tt><p>int gdbm-&gt;create();<br/> + or<br/> + int gdbm-&gt;create(string <i>file</i>);<br/> + or<br/> + int gdbm-&gt;create(string <i>file</i>, string <i>mode</i>);<br/> + </p> + </tt> + <p>Without arguments, this function does nothing. With one argument it + opens the given file as a gdbm database, if this fails for some + reason, an error will be generated. If a second argument is present, + it specifies how to open the database using one or more of the follow + flags in a string: + </p> + <p><matrix> + <r><c> r </c><c> open database for reading </c></r> + <r><c> w </c><c> open database for writing </c></r> + <r><c> c </c><c> create database if it does not exist </c></r> + <r><c> t </c><c> overwrite existing database </c></r> + <r><c> f </c><c> fast mode </c></r> + </matrix> +  + </p> + <p>The fast mode prevents the database from syncronizing each change + in the database immediately. This is dangerous because the database + can be left in an unusable state if Pike is terminated abnormally. + </p> + <p>The default mode is "rwc".</p> + </text> +  + <group><note/><text> + <p>The gdbm manual states that it is important that the database is + closed properly. Unfortunately this will not be the case if Pike + calls exit() or returns from main(). You should therefore make sure + you call close or destruct your gdbm objects when exiting your + program. This will probably be done automatically in the future. + </p> + <p/> + </text></group> +  + </doc> + </docgroup> + <docgroup homogen-name='delete' homogen-type='method'> + <method name='delete'> + </method> + <doc placeholder='true'> + <text> + <p><tt>delete</tt> - delete a value from the database</p> +  + <tt><p>int gdbm-&gt;delete(string <i>key</i>);<br/> + </p> + </tt> + <p>Remove a key from the database. Note that no error will be generated + if the key does not exist. + </p> + <p/> + </text> +  + </doc> + </docgroup> + <docgroup homogen-name='fetch' homogen-type='method'> + <method name='fetch'> + </method> + <doc placeholder='true'> + <text> + <p><tt>fetch</tt> - fetch a value from the databse</p> +  + <tt><p>string gdbm-&gt;fetch(string <i>key</i>);<br/> + </p> + </tt> + <p>Return the data associated with the key 'key' in the database. + If there was no such key in the database, zero is returned. + </p> + <p/> + </text> +  + </doc> + </docgroup> + <docgroup homogen-name='firstkey' homogen-type='method'> + <method name='firstkey'> + </method> + <doc placeholder='true'> + <text> + <p><tt>firstkey</tt> - get first key in database</p> +  + <tt><p>string gdbm-&gt;firstkey();<br/> + </p> + </tt> + <p>Return the first key in the database, this can be any key in the + database. + </p> + <p/> + </text> +  + </doc> + </docgroup> + <docgroup homogen-name='nextkey' homogen-type='method'> + <method name='nextkey'> + </method> + <doc placeholder='true'> + <text> + <p><tt>nextkey</tt> - get next key in database</p> +  + <tt><p>string gdbm-&gt;nextkey(string <i>key</i>);<br/> + </p> + </tt> + <p>This returns the key in database that follows the key 'key' key. + This is of course used to iterate over all keys in the database.</p> + </text> +  + <group><example/><text> + <tt><p>/* Write the contents of the database */<br/> + for(key=gdbm-&gt;firstkey(); k; k=gdbm-&gt;nextkey(k))<br/> + <dl><group><text>write(k+":"+gdbm-&gt;fetch(k)+"\n");<br/> + </text></group></dl> + </p> + <p><br/> + </p> + </tt></text></group> +  + </doc> + </docgroup> + <docgroup homogen-name='reorganize' homogen-type='method'> + <method name='reorganize'> + </method> + <doc placeholder='true'> + <text> + <p><tt>reorganize</tt> - reorganize database</p> +  + <tt><p>int gdbm-&gt;reorganize();<br/> + </p> + </tt> + <p>Deletions and insertions into the database can cause fragmentation + which will make the database bigger. This routine reorganizes the + contents to get rid of fragmentation. Note however that this function + can take a LOT of time to run. + </p> + <p/> + </text> +  + </doc> + </docgroup> + <docgroup homogen-name='store' homogen-type='method'> + <method name='store'> + </method> + <doc placeholder='true'> + <text> + <p><tt>store</tt> - store a value in the database</p> +  + <tt><p>int gdbm-&gt;store(string <i>key</i>, string <i>data</i>);<br/> + </p> + </tt> + <p>Associate the contents of 'data' with the key 'key'. If the key 'key' + already exists in the database the data for that key will be replaced. + If it does not exist it will be added. An error will be generated if + the database was not open for writing. + </p> + <p/> + </text> +  + </doc> + </docgroup> + <docgroup homogen-name='sync' homogen-type='method'> + <method name='sync'> + </method> + <doc placeholder='true'> + <text> + <p><tt>sync</tt> - synchronize database</p> +  + <tt><p>void gdbm-&gt;sync();<br/> + </p> + </tt> + <p>When opening the database with the 'f' flag writings to the database + can be cached in memory for a long time. Calling sync will write + all such caches to disk and not return until everything is stored + on the disk. + </p> + <p/> + </text> +  + </doc> + </docgroup> + </class> + <class name='/precompiled/mpz'> + <doc placeholder='true'> + <text> + <p><tt>/precompiled/mpz</tt> - bignum program</p> +  + <p>/precompiled/mpz is a builtin program written in C. It implements + large, very large integers. In fact, the only limitation on these + integers is the available memory. + </p> + <p>The mpz object implements all the normal integer operations. + (except xor) There are also some extra operators:</p> + </text> +  + <group><note/><text> + <p>This module is only available if libgmp.a was available and + found when Pike was compiled. + </p> + <p/> + </text></group> +  + </doc> + <docgroup homogen-name='cast' homogen-type='method'> + <method name='cast'> + </method> + <doc placeholder='true'> + <text> + <p><tt>cast</tt> - cast to other type</p> +  + <tt><p>object mpz-&gt;gcd( "string" | "int" | "<i>float</i>" );<br/> + or<br/> + (string) mpz<br/> + or<br/> + (int) mpz<br/> + or<br/> + (float) mpz<br/> + </p> + </tt> + <p>This function converts an mpz to a string, int or float. This is + nessesary when you want to view, store or use the result of an mpz + calculation.</p> + </text> +  + <group><seealso/><text> + <p><ref resolved='predef::/precompiled/mpz.cast' to='cast'>cast</ref></p> + </text></group> +  + </doc> + </docgroup> + <docgroup homogen-name='create' homogen-type='method'> + <method name='create'> + </method> + <doc placeholder='true'> + <text> + <p><tt>create</tt> - initialize a bignum</p> +  + <tt><p>object clone((program)"/precompiled/<i>mpz</i>");<br/> + or<br/> + object clone((program)"/precompiled/<i>mpz</i>",int|object|string|float <i>i</i>);<br/> + </p> + </tt> + <p>When cloning an mpz it is by default initalized to zero. However, + you can give a second argument to clone to initialize the new + object to that value. The argument can be an int, float another + mpz object, or a string containing an ascii number.</p> + </text> +  + <group><seealso/><text> + <p><ref resolved='predef::clone' to='predef::clone'>builtin/clone</ref></p> + </text></group> +  + </doc> + </docgroup> + <docgroup homogen-name='gcd' homogen-type='method'> + <method name='gcd'> + </method> + <doc placeholder='true'> + <text> + <p><tt>gcd</tt> - greatest common divisor</p> +  + <tt><p>object mpz-&gt;gcd(object|int|float|string arg)<br/> + </p> + </tt> + <p>This function returns the greatest common divisor for arg and mpz. + </p> + <p/> + </text> +  + </doc> + </docgroup> + <docgroup homogen-name='powm' homogen-type='method'> + <method name='powm'> + </method> + <doc placeholder='true'> + <text> + <p><tt>powm</tt> - raise and modulo</p> +  + <tt><p>object mpz-&gt;powm(int|string|float|object <i>a</i>,int|string|float|object <i>b</i>);<br/> + </p> + </tt> + <p>This function returns ( mpz ** a ) % b + </p> + <p/> + </text> +  + </doc> + </docgroup> + <docgroup homogen-name='probably_prime_p' homogen-type='method'> + <method name='probably_prime_p'> + </method> + <doc placeholder='true'> + <text> + <p><tt>probably_prime_p</tt> - is this number a prime?</p> +  + <tt><p>int mpz-&gt;probably_prime_p();<br/> + </p> + </tt> + <p>This function returns 1 if mpz is a prime, and 0 most of the time + if it is not. + </p> + <p/> + </text> +  + </doc> + </docgroup> + <docgroup homogen-name='sqrt' homogen-type='method'> + <method name='sqrt'> + </method> + <doc placeholder='true'> + <text> + <p><tt>sqrt</tt> - square root</p> +  + <tt><p>object mpz-&gt;sqrt();<br/> + </p> + </tt> + <p>This function return the the truncated integer part of the square + root of the value of mpz. + </p> + <p/> + </text> +  + </doc> + </docgroup> + </class>   <class name='/precompiled/port'>   <doc placeholder='true'>   <text>
3964:   </text>      <group><seealso/><text> - <p><ref resolved='predef::/precompiled/file' to='file'>file</ref></p> + <p><ref resolved='predef::/precompiled/port.accept' to='/precompiled/file'>/precompiled/file</ref></p>   </text></group>      </doc>
4071:      <group><note/><text>   <p>This function is only for the advanced user, and is generally used - when sockets are passed to uLPC at exec time.</p> + when sockets are passed to Pike at exec time.</p>   </text></group>      <group><seealso/><text>
4126:   <text>   <p><tt>/precompiled/regexp</tt> - regexp handling module</p>    - <p>/precompiled/regexp is a precompiled LPC program that interfaces a + <p>/precompiled/regexp is a precompiled Pike program that interfaces a   regexp package written in C. It contains a few simple functions to   handle regexps. A short description of regexp follows:   </p> - <p>. Matches any character<br/> - [abc] Matches a, b or c<br/> - [a-z] Matches any character a to z inclusive<br/> - [^ac] Matches any character except a and c<br/> - (x) Matches x (x might be any regexp)<br/> - x* Matches zero or more occurances of 'x' (x may be anything)<br/> - x|y Matches x or y. (x or y may be any regexp)<br/> - xy Matches xy (x and y may be any regexp)<br/> - ^ Matches beginning of string (but no characters)<br/> - $ Matches end of string (but no characters)<br/> - &lt;x&gt; Used with split() to put the string matching x into the<br/> - <dl><group><text>result array.<br/> - </text></group></dl> + <p><matrix> + <r><c> . </c><c> Matches any character </c></r> + <r><c> [abc] </c><c> Matches a, b or c </c></r> + <r><c> [a-z] </c><c> Matches any character a to z inclusive </c></r> + <r><c> [^ac] </c><c> Matches any character except a and c </c></r> + <r><c> (x) </c><c> Matches x (x might be any regexp) If used with split, this also puts the string matching x into the result array. </c></r> + <r><c> x* </c><c> Matches zero or more occurances of 'x' (x may be any regexp) </c></r> + <r><c> x+ </c><c> Matches one or more occurances of 'x' (x may be any regexp) </c></r> + <r><c> x|y </c><c> Matches x or y. (x or y may be any regexp) </c></r> + <r><c> xy </c><c> Matches xy (x and y may be any regexp) </c></r> + <r><c> ^ </c><c> Matches beginning of string (but no characters) </c></r> + <r><c> $ </c><c> Matches end of string (but no characters) </c></r> + <r><c> \&lt; </c><c> matches the beginning of a word (but no characters) </c></r> + <r><c> \&gt; </c><c> matches the end of a word (but no characters) </c></r> + </matrix> +    </p>   <p>Note that \ can be used to quote these characters in which case   they match themselves, nothing else. Also note that when quoting - these something in uLPC you need two \ because uLPC also uses + these something in Pike you need two \ because Pike also uses   this character for quoting.   </p>   <p>For more information about regexps, refer to your unix manuals such   as sed or ed.   </p> - <p>Descriptions of all functions in /precompiled/file follows: + <p>Descriptions of all functions in /precompiled/regexp follows:   </p>   <p/>   </text>
4219:   </p>   </tt>   <p>Works as regexp-&gt;match, but returns an array of the strings that - matched the subregexps. Subregexps are those contained in &lt; &gt; in + matched the subregexps. Subregexps are those contained in ( ) in   the regexp. Subregexps that were not matched will contain zero.   If the total regexp didn't match, zero is returned.</p>   </text>