diff --git a/doc/builtin/sizeof b/doc/builtin/sizeof index e1e2243586e89f0e8af85c78dd8603bdff802a49..ec33611317e7e50f29d9820d7227b0dc297120d3 100644 --- a/doc/builtin/sizeof +++ b/doc/builtin/sizeof @@ -2,7 +2,7 @@ NAME sizeof - return the size of an array, string, list or mapping SYNTAX - int sizeof(string|list|mapping|array a); + int sizeof(string|list|mapping|array|object a); DESCRIPTION This function returns the number of indexes available in the argument diff --git a/doc/lpc/preprocessor b/doc/lpc/preprocessor index b8e0361be86cc941129e7ee12a344c24ea565221..3c45c0d9db2f5290ebeba2786b1ad4a27644dd6e 100644 --- a/doc/lpc/preprocessor +++ b/doc/lpc/preprocessor @@ -22,6 +22,9 @@ PREPROCESSOR DIRECTIVES #pragma #undef +KEYWORDS + lpc + ============================================================================ DIRECTIVE #! diff --git a/doc/lpc/sscanf b/doc/lpc/sscanf new file mode 100644 index 0000000000000000000000000000000000000000..22526c5210dcf89d83e0737bbd62d6bc26ba4393 --- /dev/null +++ b/doc/lpc/sscanf @@ -0,0 +1,33 @@ +NAME + sscanf - scan a string using a format string + +SYNTAX + int sscanf(string str, string fmt, mixed var1, mixed var2 ...); + +DESCRIPTION + Parse a string str using the format fmt. fmt can contain strings + separated by "%d,%s,%c and %f. Every % corresponds to one of var1, + var2... + + %d gives an integer + %o gives an octal integer + %x gives a hexadecimal integer + %D gives an integer that is either octal (leading zero), + hexadecimal (leading 0x) or decimal. + %f gives a float + %c matches one char and returns it as an integer + %s gives a string + %[set] matches a string containing a given set of characters. + (thos given inside the brackets) %[^set] means any character + ecept those inside brackets. %[0-9H] means any number or 'H'. + + If a * is put between the percent and the operator, the operator + will not only match it's argument, not assign any variables. + + Number of matched arguments is returned. + +KEYWORDS + string + +SEE ALSO + explode, sprintf diff --git a/doc/operators/and b/doc/operators/and index 2099f48fca4391a9bbf57d2e4d6cddcbd27c1e6c..849eeae0ce4920ef6172fb11a6dbf0231ca6cb88 100644 --- a/doc/operators/and +++ b/doc/operators/and @@ -18,7 +18,7 @@ DESCRIPTION however, the values will be taken from the rightmost mapping. KEYWORDS - operator + operators SEE ALSO `|, `^ diff --git a/doc/operators/complement b/doc/operators/complement index 0c9ff65f250950431ae125a25d9b4089ba97d642..d3d04130464495000dbedb6b56888c979358b174 100644 --- a/doc/operators/complement +++ b/doc/operators/complement @@ -11,7 +11,7 @@ DESCRIPTION new integer. KEYWORDS - operator + operators SEE ALSO `&, `|, `^ \ No newline at end of file diff --git a/doc/operators/divide b/doc/operators/divide index 82cb262e93adfb61c8b69c8f5b711958febca0bc..b4e22ae6b3acebf55ef2b518481ce8002e4a67c1 100644 --- a/doc/operators/divide +++ b/doc/operators/divide @@ -25,7 +25,7 @@ EXAMPLES `/(2,2) returns 1 KEYWORDS - operator + operators SEE ALSO `*, `% diff --git a/doc/operators/is_equal b/doc/operators/is_equal index 12653faecab656e5b9d008ab417057c0d42c5b63..71b51e625eb4c9ee638d44466a7c0c020f3a5afe 100644 --- a/doc/operators/is_equal +++ b/doc/operators/is_equal @@ -13,7 +13,7 @@ DESCRIPTION two arrays LOOK alike, it must be the same array.) KEYWORDS - operator + operators SEE ALSO `!=, `<, `>, `<=, `>=, efuns/equal diff --git a/doc/operators/is_greater_or_equal b/doc/operators/is_greater_or_equal index 1f744793f8e7b1aa1cd442ef115a72b3db132dba..ad0f6ab81d9ffcb122a2263db3857fd9cd9e09b2 100644 --- a/doc/operators/is_greater_or_equal +++ b/doc/operators/is_greater_or_equal @@ -11,7 +11,7 @@ DESCRIPTION is greater than or equal to the second one. KEYWORDS - operator + operators SEE ALSO `!=, `==, `>, `<, `<= diff --git a/doc/operators/is_greater_than b/doc/operators/is_greater_than index 84ddca84734da6fb625ea09fd44fe22072da392e..3dc0726f9d35936a3b3d0667caf9e061ed1dea3f 100644 --- a/doc/operators/is_greater_than +++ b/doc/operators/is_greater_than @@ -11,7 +11,7 @@ DESCRIPTION is greater than the second one. KEYWORDS - operator + operators SEE ALSO `!=, `==, `<, `<=, `>= diff --git a/doc/operators/is_lesser_or_equal b/doc/operators/is_lesser_or_equal index e6956a73c61a7c78e49d54ce016700945f0a2878..a15902e21fbd9ea89a56705797d30b281519168e 100644 --- a/doc/operators/is_lesser_or_equal +++ b/doc/operators/is_lesser_or_equal @@ -11,7 +11,7 @@ DESCRIPTION is lesser than or equal to the second one. KEYWORDS - operator + operators SEE ALSO `!=, `==, `>, `<, `>= diff --git a/doc/operators/is_lesser_than b/doc/operators/is_lesser_than index 0482284764b1798427642a5655a011d68f5007b6..0c40c489442fd6ff09ed7b932de83032454d8ea7 100644 --- a/doc/operators/is_lesser_than +++ b/doc/operators/is_lesser_than @@ -11,7 +11,7 @@ DESCRIPTION is lesser than the second one. KEYWORDS - operator + operators SEE ALSO `!=, `==, `>, `<=, `>= diff --git a/doc/operators/minus b/doc/operators/minus index 8bb403bf528e0388a721a7d57f0402410840863c..2ec59586af0e1a8fb88b8c769ac8a0639f4bcc4c 100644 --- a/doc/operators/minus +++ b/doc/operators/minus @@ -30,7 +30,7 @@ EXAMPLES ([1:2,2:1])-([1:0]) returns ([2:1]) KEYWORDS - operator + operators SEE ALSO `+ diff --git a/doc/operators/modulo b/doc/operators/modulo index 6e9561ea8d70f8947d38beb0e8bd8b7a5ce94514..b9d4eec9c73c06ba702b5cc5b11d72a752a2fdb8 100644 --- a/doc/operators/modulo +++ b/doc/operators/modulo @@ -20,7 +20,7 @@ EXAMPLES 2%0.3 returns 0.2 KEYWORDS - operator + operators SEE ALSO `/, `* diff --git a/doc/operators/mult b/doc/operators/mult index e0ad0603e95b18cbbc380e83a6a6d39809a16f6a..8a5c81631c0ec77cf06451673c53c5d43bba1172 100644 --- a/doc/operators/mult +++ b/doc/operators/mult @@ -24,7 +24,7 @@ EXAMPLES `*(2,2,2) returns 8 KEYWORDS - operator + operators SEE ALSO `/ diff --git a/doc/operators/not b/doc/operators/not index 1c251ee35fc599bfa1216da02c8883ffe3977979..9f51725779b7fe5812876695df16949ee29a1ba9 100644 --- a/doc/operators/not +++ b/doc/operators/not @@ -10,4 +10,4 @@ DESCRIPTION Returns 1 if a is zero, 0 otherwise. KEYWORDS - operator + operators diff --git a/doc/operators/not_equal b/doc/operators/not_equal index d68f40d3d17d0ebbab282822b3e2b8b9de5ddfa5..faf93682990c96107c2395619ad83d104ead3fc4 100644 --- a/doc/operators/not_equal +++ b/doc/operators/not_equal @@ -13,7 +13,7 @@ DESCRIPTION two arrays LOOK alike, it must be the same array.) KEYWORDS - operator + operators SEE ALSO `==, `<, `>, `<=, `>=, efuns/equal diff --git a/doc/operators/or b/doc/operators/or index 9985a3860cdd4ce68903e49a17b64ea85e6c902a..0388fa1318c20897fea7c9731890aa17d8a9ba0c 100644 --- a/doc/operators/or +++ b/doc/operators/or @@ -18,7 +18,7 @@ DESCRIPTION however, the values will be taken from the rightmost mapping. KEYWORDS - operator + operators SEE ALSO `&, `^ diff --git a/doc/operators/plus b/doc/operators/plus index 6402ad168aec003d1e60ec065933b9a71d51ec90..6fbda79834a1f3003cb537a1fc1a8118273e040f 100644 --- a/doc/operators/plus +++ b/doc/operators/plus @@ -22,7 +22,7 @@ EXAMPLES `+(2,2,2) returns 6 KEYWORDS - operator + operators SEE ALSO `-, `* diff --git a/doc/operators/shift_left b/doc/operators/shift_left index a354ad32dbd1933397a3300613aca051ddfb2002..7de5c8782a45860a812a012ddaff11cb2a75f9c2 100644 --- a/doc/operators/shift_left +++ b/doc/operators/shift_left @@ -11,7 +11,7 @@ DESCRIPTION multiplying a by 2 b times. KEYWORDS - operator + operators SEE ALSO `>> diff --git a/doc/operators/shift_right b/doc/operators/shift_right index 363e77d63fb3f4722a9a96a7e326729a0234b14e..8de24822ce2c6d5046f92cd8814fc27774c11341 100644 --- a/doc/operators/shift_right +++ b/doc/operators/shift_right @@ -11,7 +11,7 @@ DESCRIPTION dividing a by 2 b times. KEYWORDS - operator + operators SEE ALSO `<< diff --git a/doc/operators/xor b/doc/operators/xor index fe9d4e26763e2215a69cd0d75a4b51c96aec974c..e41878d35fd29bf860806fbad602dcfef7084c3a 100644 --- a/doc/operators/xor +++ b/doc/operators/xor @@ -18,7 +18,7 @@ DESCRIPTION however, the values will be taken from the rightmost mapping. KEYWORDS - operator + operators SEE ALSO `|, `& diff --git a/doc/simulated/sum b/doc/simulated/sum new file mode 100644 index 0000000000000000000000000000000000000000..2179b3c5ccb86fe3de0790bcfb8cfc74e4bcab19 --- /dev/null +++ b/doc/simulated/sum @@ -0,0 +1,23 @@ +NAME + sum - add values together + +SYNTAX + int sum(int ... i); + or + float sum(float ... f); + or + string sum(string|float|int ... p); + or + array sum(array ... a); + or + mapping sum(mapping ... m); + or + list sum(list ... l); + +DESCRIPTION + 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. + +KEYWORDS + int, float, string, array, mapping, list diff --git a/doc/types/array b/doc/types/array index 2bbbf51f372fc3594129ac73256b6720ba3d9077..0ffe36945f4c4746225256ecffb136caf89d6ceb 100644 --- a/doc/types/array +++ b/doc/types/array @@ -43,7 +43,7 @@ DESCRIPTION includes) element d. KEYWORDS - type + types SEE ALSO mapping, list, builtin/allocate, builtin/sizeof, builtin/values diff --git a/doc/types/float b/doc/types/float index ca52ca30afe5663a4c71df3876e354ffe57fd89a..454fe71cb440b24d39b6ae4dc160ac202bafdb78 100644 --- a/doc/types/float +++ b/doc/types/float @@ -31,7 +31,7 @@ NOTA BENE to the same type first. KEYWORDS - type + types SEE ALSO math/sin, math/cos, math/tan, math/sqrt diff --git a/doc/types/function b/doc/types/function index ad60ad37a6c7fc186eca8c20a66e4b8db96f437a..f90318276923c589087442e52af58decc47c0708 100644 --- a/doc/types/function +++ b/doc/types/function @@ -14,7 +14,7 @@ DESCRIPTION will be returned. KEYWORDS - type + types SEE ALSO object, builtin/call_function, builtin/functionp, diff --git a/doc/types/int b/doc/types/int index e174c18023aeb647622f9768401b0f6ae2e612b8..13014a0eb0f3224fb1f6d6aded6bfb7e263d75cf 100644 --- a/doc/types/int +++ b/doc/types/int @@ -33,7 +33,7 @@ DESCRIPTION a >= b returns 1 if a is greater or equal to b, 0 otherwise KEYWORDS - type + types SEE ALSO float diff --git a/doc/types/list b/doc/types/list index b361d0915c9254493abd4f91c6147764486ecd28..cfc28895507be5f718caae1a7101a3327d5c543e 100644 --- a/doc/types/list +++ b/doc/types/list @@ -32,7 +32,7 @@ DESCRIPTION present. KEYWORDS - type + types SEE ALSO mapping, array, builtin/indices, builtin/sizeof diff --git a/doc/types/mapping b/doc/types/mapping index f009414380323923d62c3d8634e9f0ac0469d250..36f63c3ac548269129f1e78f1cb0d33d9bb173c3 100644 --- a/doc/types/mapping +++ b/doc/types/mapping @@ -41,7 +41,7 @@ DESCRIPTION already there. KEYWORDS - type + types SEE ALSO array, list, builtin/sizeof, builtin/indices, builtin/values diff --git a/doc/types/object b/doc/types/object index 316e6c185cf4459b1b06f20b9dbc5526b7422306..c96f0de705be25882cbc1ed64da260706e9870f5 100644 --- a/doc/types/object +++ b/doc/types/object @@ -19,7 +19,7 @@ DESCRIPTION o != o2 return 0 if o and o2 are the same object KEYWORDS - type + types SEE ALSO program, function, builtin/clone, builtin/destruct diff --git a/doc/types/program b/doc/types/program index b428dbcf85bfe13e2ffc9575a5e03f0fbfe795db..c653029056c9559b4c7553ed3e0a2fc73458e364 100644 --- a/doc/types/program +++ b/doc/types/program @@ -9,7 +9,7 @@ DESCRIPTION are == and !=. KEYWORDS - type + types SEE ALSO object, function, builtin/compile_file, builtin/compile_string, diff --git a/doc/types/string b/doc/types/string index 8074d27562742c34aba1d2a3b064bb8653608cc8..0586b1e690396643692312b96b6cc0384efb040b 100644 --- a/doc/types/string +++ b/doc/types/string @@ -32,7 +32,7 @@ DESCRIPTION a >= b returns 1 if a is greater or equal to b, 0 otherwise KEYWORDS - type + types SEE ALSO builtin/indices, builtin/values, builtin/sscanf, builtin/sprintf,