pike-language-server 0.8.49

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,2601 @@
1
+ {
2
+ "_Static_assert": {
3
+ "signature": "function(int, string : void)",
4
+ "markdown": "Perform a compile-time assertion check.\n\nIf `constant_expression` is false, a compiler error message\n containing `constant_message` will be generated.",
5
+ "params": [
6
+ {
7
+ "name": "constant_expression",
8
+ "type": "int"
9
+ },
10
+ {
11
+ "name": "constant_message",
12
+ "type": "string"
13
+ }
14
+ ]
15
+ },
16
+ "__automap__": {
17
+ "signature": "function(mixed, mixed ... : array)",
18
+ "markdown": "Automap execution function.",
19
+ "params": [
20
+ {
21
+ "name": "fun",
22
+ "type": "function"
23
+ },
24
+ {
25
+ "name": "args",
26
+ "type": "mixed"
27
+ }
28
+ ],
29
+ "returnType": "array"
30
+ },
31
+ "__empty_program": {
32
+ "signature": "function(void | int, void | string : program)",
33
+ "markdown": "",
34
+ "params": [
35
+ {
36
+ "name": "line",
37
+ "type": "int"
38
+ },
39
+ {
40
+ "name": "file",
41
+ "type": "string"
42
+ }
43
+ ],
44
+ "returnType": "program"
45
+ },
46
+ "__handle_sprintf_format": {
47
+ "signature": "function(string, string, type(mixed), type(mixed) : type(mixed))",
48
+ "markdown": "Type attribute handler for `\"sprintf_format\"`.",
49
+ "params": [
50
+ {
51
+ "name": "attr",
52
+ "type": "string"
53
+ },
54
+ {
55
+ "name": "fmt",
56
+ "type": "string"
57
+ },
58
+ {
59
+ "name": "arg_type",
60
+ "type": "mixed"
61
+ },
62
+ {
63
+ "name": "cont_type",
64
+ "type": "mixed"
65
+ }
66
+ ],
67
+ "returnType": "mixed"
68
+ },
69
+ "__parse_pike_type": {
70
+ "signature": "function(string(8bit) : string(8bit))",
71
+ "markdown": "",
72
+ "params": [
73
+ {
74
+ "name": "t",
75
+ "type": "string"
76
+ }
77
+ ],
78
+ "returnType": "string"
79
+ },
80
+ "_exit": {
81
+ "signature": "function(int : void)",
82
+ "markdown": "This function does the same as `exit`, but doesn't bother to clean\n up the Pike interpreter before exiting. This means that no destructors\n will be called, caches will not be flushed, file locks might not be\n released, and databases might not be closed properly.\n\nUse with extreme caution.",
83
+ "params": [
84
+ {
85
+ "name": "returncode",
86
+ "type": "int"
87
+ }
88
+ ]
89
+ },
90
+ "_next": {
91
+ "signature": "scope(0,function(string : string) | function(object : object) | function(mapping : mapping) | function(multiset : multiset) | function(program : program) | function(array : array))",
92
+ "markdown": "Find the next object/array/mapping/multiset/program or string.\n\nAll objects, arrays, mappings, multisets, programs and strings are\n stored in linked lists inside Pike. This function returns the next\n item on the corresponding list. It is mainly meant for debugging\n the Pike runtime, but can also be used to control memory usage.",
93
+ "params": [
94
+ {
95
+ "name": "x",
96
+ "type": "mixed"
97
+ }
98
+ ],
99
+ "returnType": "mixed"
100
+ },
101
+ "_prev": {
102
+ "signature": "scope(0,function(object : object) | function(mapping : mapping) | function(multiset : multiset) | function(program : program) | function(array : array))",
103
+ "markdown": "Find the previous object/array/mapping/multiset or program.\n\nAll objects, arrays, mappings, multisets and programs are\n stored in linked lists inside Pike. This function returns the previous\n item on the corresponding list. It is mainly meant for debugging\n the Pike runtime, but can also be used to control memory usage.",
104
+ "params": [
105
+ {
106
+ "name": "x",
107
+ "type": "mixed"
108
+ }
109
+ ],
110
+ "returnType": "mixed"
111
+ },
112
+ "_refs": {
113
+ "signature": "function(function | array | mapping | multiset | object | program | string : int)",
114
+ "markdown": "Return the number of references `o` has.\n\nIt is mainly meant for debugging the Pike runtime, but can also be\n used to control memory usage.",
115
+ "params": [
116
+ {
117
+ "name": "o",
118
+ "type": "string | array | mapping | multiset"
119
+ }
120
+ ],
121
+ "returnType": "int"
122
+ },
123
+ "_typeof": {
124
+ "signature": "scope(0,function((0=mixed) : type(0)))",
125
+ "markdown": "Return the runtime type of `x`.",
126
+ "params": [
127
+ {
128
+ "name": "x",
129
+ "type": "mixed"
130
+ }
131
+ ],
132
+ "returnType": "mixed"
133
+ },
134
+ "`!": {
135
+ "signature": "function(mixed : int(1bit))",
136
+ "markdown": "Logical not.\n\nEvery expression with the `!` operator becomes a call to\n this function, i.e. `!a` is the same as\n `predef::`!(a)`.\n\nIt's also used when necessary to test truth on objects, i.e. in\n a statement `if (o) ...` where `o` is an object, the\n test becomes the equivalent of `!!o` so that any\n ``!` the object might have gets called.",
137
+ "params": [
138
+ {
139
+ "name": "arg",
140
+ "type": "object | function"
141
+ }
142
+ ],
143
+ "returnType": "int"
144
+ },
145
+ "`!=": {
146
+ "signature": "scope(0,function(int | float, int | float, int | float ... : int(1bit)) | function((0=array | mapping | multiset | string), 0, 0 ... : int(1bit)) | function(function | object | program, mixed, mixed ... : int(1bit)) | function(mixed, function | object | program, mixed ... : int(1bit)) | function(type(mixed), type(mixed), function | program | type(mixed) ... : int(1bit)) | function((0=array | mapping | multiset | string), !0 ... : int(1..1)))",
147
+ "markdown": "Inequality test.\n\nEvery expression with the `!=` operator becomes a call to\n this function, i.e. `a!=b` is the same as\n `predef::`!=(a,b)`.\n\nThis is the inverse of ``==`; see that function for further\n details.",
148
+ "params": [
149
+ {
150
+ "name": "arg1",
151
+ "type": "mixed"
152
+ },
153
+ {
154
+ "name": "arg2",
155
+ "type": "mixed"
156
+ },
157
+ {
158
+ "name": "extras",
159
+ "type": "mixed"
160
+ }
161
+ ],
162
+ "returnType": "int"
163
+ },
164
+ "`%": {
165
+ "signature": "scope(0,function(mixed, object : mixed) | function(object, mixed : mixed) | function(int, int : int) | function(array((0=mixed)), int : array(0)) | function(string, int : string) | !function(!float ... : mixed) & function(int | float, int | float : float))",
166
+ "markdown": "Modulo.\n\nEvery expression with the `%` operator becomes a call to\n this function, i.e. `a%b` is the same as\n `predef::`%(a,b)`.",
167
+ "params": [
168
+ {
169
+ "name": "arg1",
170
+ "type": "object"
171
+ },
172
+ {
173
+ "name": "arg2",
174
+ "type": "mixed"
175
+ }
176
+ ],
177
+ "returnType": "mixed"
178
+ },
179
+ "`&": {
180
+ "signature": "scope(0,function((0=mixed) : 0) | function(object, mixed, mixed ... : mixed) | function(mixed, object, mixed ... : mixed) | function((0=int) : 0) | function((0=array) : 0) | function((0=mapping) : 0) | function((0=multiset) : 0) | function((0=string) : 0) | function((0=program | type(mixed)) : 0) | !function(!int ... : mixed) & function((1=int), (2=int) ... : 1 | 2) | !function(!array ... : mixed) & function((1=array), (2=array) ... : 1 | 2) | !function(!mapping ... : mixed) & function((1=mapping), (2=mapping) ... : 1 | 2) | !function(!multiset ... : mixed) & function((1=multiset), (2=multiset) ... : 1 | 2) | !function(!string ... : mixed) & function((1=string), (2=string) ... : 1 | 2) | !function(!(program | type(mixed)) ... : mixed) & function((1=program | type(mixed)), (2=program | type(mixed)) ... : 1 | 2) | !function(!mapping ... : mixed) & function(array | multiset | (4=mapping) ... : 4))",
181
+ "markdown": "Bitwise and/intersection.\n\nEvery expression with the `&` operator becomes a call to\n this function, i.e. `a&b` is the same as\n `predef::`&(a,b)`.",
182
+ "params": [
183
+ {
184
+ "name": "arg1",
185
+ "type": "mixed"
186
+ }
187
+ ],
188
+ "returnType": "mixed"
189
+ },
190
+ "`*": {
191
+ "signature": "scope(0,function(int, int ... : int) | function(array(array((1=mixed))), array((1=mixed)) : array(1)) | function(array(string), string : string) | function(array((0=mixed)), int : array(0)) | function(array((0=mixed)), float : array(0)) | function((0=string), int : 0) | function((0=string), float : 0) | !function(!float ... : mixed) & function(int | float, int | float ... : float) | !function(!(object | mixed) ... : mixed) & function(void | mixed ... : mixed))",
192
+ "markdown": "Multiplication/repetition/implosion.\n\nEvery expression with the `*` operator becomes a call to\n this function, i.e. `a*b` is the same as\n `predef::`*(a,b)`. Longer `*` expressions are\n normally optimized to one call, so e.g. `a*b*c` becomes\n `predef::`*(a,b,c)`.",
193
+ "params": [
194
+ {
195
+ "name": "arg1",
196
+ "type": "mixed"
197
+ }
198
+ ],
199
+ "returnType": "mixed"
200
+ },
201
+ "`+": {
202
+ "signature": "scope(0,function(int, int ... : int) | function((0=array), (1=array) ... : 0 | 1) | function((0=mapping), (1=mapping) ... : 0 | 1) | function((0=multiset), (1=multiset) ... : 0 | 1) | !function(!(object | mixed) ... : mixed) & function(mixed ... : mixed) | !function(!float ... : mixed) & function(int | float, int | float ... : float) | !function(!string ... : mixed) & function(int | float | (0=string), int | float | (1=string) ... : 0 | 1))",
203
+ "markdown": "Addition/concatenation.\n\nEvery expression with the `+` operator becomes a call to\n this function, i.e. `a+b` is the same as\n `predef::`+(a,b)`. Longer `+` expressions are\n normally optimized to one call, so e.g. `a+b+c` becomes\n `predef::`+(a,b,c)`.",
204
+ "params": [
205
+ {
206
+ "name": "arg",
207
+ "type": "mixed"
208
+ }
209
+ ],
210
+ "returnType": "mixed"
211
+ },
212
+ "`-": {
213
+ "signature": "scope(0,function(int, int ... : int) | function(array((0=mixed)), array ... : array(0)) | function(mapping((1=mixed):(2=mixed)), array | mapping | multiset ... : mapping(1:2)) | function(multiset((3=mixed)), multiset : multiset(3)) | function((0=string), string ... : 0) | !function(!(object | mixed) ... : mixed) & function(mixed ... : mixed) | !function(!float ... : mixed) & function(int | float, int | float ... : float))",
214
+ "markdown": "Negation/subtraction/set difference.\n\nEvery expression with the `-` operator becomes a call to\n this function, i.e. `-a` is the same as\n `predef::`-(a)` and `a-b` is the same as\n `predef::`-(a,b)`. Longer `-` expressions are\n normally optimized to one call, so e.g. `a-b-c` becomes\n `predef::`-(a,b,c)`.",
215
+ "params": [
216
+ {
217
+ "name": "arg1",
218
+ "type": "mixed"
219
+ }
220
+ ],
221
+ "returnType": "mixed"
222
+ },
223
+ "`->": {
224
+ "signature": "scope(0,function(array(array | mapping | multiset | object), string : array) | function(mapping | multiset | object | program, string : mixed))",
225
+ "markdown": "Arrow indexing.\n\nEvery non-lvalue expression with the `->` operator becomes\n a call to this function. `a->b` is the same as\n `predef::`^(a,\"b\")` where `\"b\"` is the symbol\n `b` in string form.\n\nThis function behaves like ``[]`, except that the index is\n passed literally as a string instead of being evaluated.",
226
+ "params": [
227
+ {
228
+ "name": "arg",
229
+ "type": "object"
230
+ },
231
+ {
232
+ "name": "index",
233
+ "type": "string"
234
+ }
235
+ ],
236
+ "returnType": "mixed"
237
+ },
238
+ "`->=": {
239
+ "signature": "scope(0,function(array(array | mapping | multiset | object), string, (0=mixed) : 0) | function(multiset | object, string, (1=mixed) : 1) | function(mapping(mixed:(2=mixed)), string, 2 : 2))",
240
+ "markdown": "Arrow index assignment.\n\nEvery lvalue expression with the `->` operator becomes a\n call to this function, i.e. `a->b=c` is the same as\n `predef::`->=(a,\"b\",c)` where `\"b\"` is the symbol\n `b` in string form.\n\nThis function behaves like ``[]=`, except that the index is\n passed literally as a string instead of being evaluated.\n\nIf `arg` is an object that implements ``->=`, that function\n will be called with `index` and `val` as the arguments.",
241
+ "params": [
242
+ {
243
+ "name": "arg",
244
+ "type": "object"
245
+ },
246
+ {
247
+ "name": "index",
248
+ "type": "string"
249
+ },
250
+ {
251
+ "name": "val",
252
+ "type": "mixed"
253
+ }
254
+ ],
255
+ "returnType": "mixed"
256
+ },
257
+ "`/": {
258
+ "signature": "scope(0,function(int, int ... : int) | function(array((0=mixed)), int | float | array ... : array(array(0))) | function(string, int | float | string ... : array(string)) | !function(!(object | mixed) ... : mixed) & function(mixed ... : mixed) | !function(!float ... : mixed) & function(int | float, int | float ... : float))",
259
+ "markdown": "Division/split.\n\nEvery expression with the `/` operator becomes a call to\n this function, i.e. `a/b` is the same as\n `predef::`/(a,b)`.",
260
+ "params": [
261
+ {
262
+ "name": "arg1",
263
+ "type": "object"
264
+ },
265
+ {
266
+ "name": "arg2",
267
+ "type": "mixed"
268
+ }
269
+ ],
270
+ "returnType": "mixed"
271
+ },
272
+ "`<": {
273
+ "signature": "function(int | float ... : int(1bit)) | function(string ... : int(1bit)) | function(program | type(mixed), program | type(mixed), program | type(mixed) ... : int(1bit)) | !function(!(object | mixed) ... : mixed) & function(mixed ... : int(1bit))",
274
+ "markdown": "Less than test.\n\nEvery expression with the `<` operator becomes a call to\n this function, i.e. `a<b` is the same as\n `predef::`<(a,b)`.",
275
+ "params": [
276
+ {
277
+ "name": "arg1",
278
+ "type": "mixed"
279
+ },
280
+ {
281
+ "name": "arg2",
282
+ "type": "mixed"
283
+ },
284
+ {
285
+ "name": "extras",
286
+ "type": "mixed"
287
+ }
288
+ ],
289
+ "returnType": "int"
290
+ },
291
+ "`<<": {
292
+ "signature": "scope(0,function(int(0..2147483647), int(0..2147483647) : int(0..2147483647)) | !function(!object ... : mixed) & (function(mixed, object : mixed) | function(object, mixed : mixed)) | !function(!int ... : mixed) & function(int, int : int))",
293
+ "markdown": "Left shift.\n\nEvery expression with the `<<` operator becomes a call to\n this function, i.e. `a<<b` is the same as\n `predef::`<<(a,b)`.\n\nIf `arg1` is an object that implements ``<<`, that\n function will be called with `arg2` as the single argument.\n\nIf `arg2` is an object that implements ```<<`, that\n function will be called with `arg1` as the single argument.\n\nOtherwise `arg1` will be shifted `arg2` bits left.",
294
+ "params": [
295
+ {
296
+ "name": "arg1",
297
+ "type": "int"
298
+ },
299
+ {
300
+ "name": "arg2",
301
+ "type": "int"
302
+ }
303
+ ],
304
+ "returnType": "int"
305
+ },
306
+ "`<=": {
307
+ "signature": "function(int | float ... : int(1bit)) | function(string ... : int(1bit)) | function(program | type(mixed), program | type(mixed), program | type(mixed) ... : int(1bit)) | !function(!(object | mixed) ... : mixed) & function(mixed ... : int(1bit))",
308
+ "markdown": "Less than or equal test.\n\nEvery expression with the `<=` operator becomes a call to\n this function, i.e. `a<=b` is the same as\n `predef::`<=(a,b)`.",
309
+ "params": [
310
+ {
311
+ "name": "arg1",
312
+ "type": "mixed"
313
+ },
314
+ {
315
+ "name": "arg2",
316
+ "type": "mixed"
317
+ },
318
+ {
319
+ "name": "extras",
320
+ "type": "mixed"
321
+ }
322
+ ],
323
+ "returnType": "int"
324
+ },
325
+ "`==": {
326
+ "signature": "scope(0,function(int | float, int | float, int | float ... : int(1bit)) | function((0=array | mapping | multiset | string), 0, 0 ... : int(1bit)) | function(function | object | program, mixed, mixed ... : int(1bit)) | function(mixed, function | object | program, mixed ... : int(1bit)) | function(type(mixed), type(mixed), function | program | type(mixed) ... : int(1bit)) | function((0=array | mapping | multiset | string), !0 ... : zero))",
327
+ "markdown": "Equality test.\n\nEvery expression with the `==` operator becomes a call to\n this function, i.e. `a==b` is the same as\n `predef::`==(a,b)`.\n\nIf more than two arguments are given, each argument is compared\n with the following one as described below, and the test is\n successful iff all comparisons are successful.\n\nIf the first argument is an object with an ``==`, that\n function is called with the second as argument, unless the\n second argument is the same as the first argument. The test is\n successful iff its result is nonzero (according to ``!`).\n\nOtherwise, if the second argument is an object with an\n ``==`, that function is called with the first as\n argument, and the test is successful iff its result is nonzero\n (according to ``!`).\n\nOtherwise, if the arguments are of different types, the test is\n unsuccessful. Function pointers to programs are automatically\n converted to program pointers if necessary, though.\n\nOtherwise the test depends on the type of the arguments:",
328
+ "params": [
329
+ {
330
+ "name": "arg1",
331
+ "type": "mixed"
332
+ },
333
+ {
334
+ "name": "arg2",
335
+ "type": "mixed"
336
+ },
337
+ {
338
+ "name": "extras",
339
+ "type": "mixed"
340
+ }
341
+ ],
342
+ "returnType": "int"
343
+ },
344
+ "`>": {
345
+ "signature": "function(int | float ... : int(1bit)) | function(string ... : int(1bit)) | function(program | type(mixed), program | type(mixed), program | type(mixed) ... : int(1bit)) | !function(!(object | mixed) ... : mixed) & function(mixed ... : int(1bit))",
346
+ "markdown": "Greater than test.\n\nEvery expression with the `>` operator becomes a call to\n this function, i.e. `a>b` is the same as\n `predef::`>(a,b)`.",
347
+ "params": [
348
+ {
349
+ "name": "arg1",
350
+ "type": "mixed"
351
+ },
352
+ {
353
+ "name": "arg2",
354
+ "type": "mixed"
355
+ },
356
+ {
357
+ "name": "extras",
358
+ "type": "mixed"
359
+ }
360
+ ],
361
+ "returnType": "int"
362
+ },
363
+ "`>=": {
364
+ "signature": "function(int | float ... : int(1bit)) | function(string ... : int(1bit)) | function(program | type(mixed), program | type(mixed), program | type(mixed) ... : int(1bit)) | !function(!(object | mixed) ... : mixed) & function(mixed ... : int(1bit))",
365
+ "markdown": "Greater than or equal test.\n\nEvery expression with the `>=` operator becomes a call to\n this function, i.e. `a>=b` is the same as\n `predef::`>=(a,b)`.",
366
+ "params": [
367
+ {
368
+ "name": "arg1",
369
+ "type": "mixed"
370
+ },
371
+ {
372
+ "name": "arg2",
373
+ "type": "mixed"
374
+ },
375
+ {
376
+ "name": "extras",
377
+ "type": "mixed"
378
+ }
379
+ ],
380
+ "returnType": "int"
381
+ },
382
+ "`>>": {
383
+ "signature": "scope(0,function(int(0..2147483647), int(0..2147483647) : int(0..2147483647)) | !function(!object ... : mixed) & (function(mixed, object : mixed) | function(object, mixed : mixed)) | !function(!int ... : mixed) & function(int, int : int))",
384
+ "markdown": "Right shift.\n\nEvery expression with the `>>` operator becomes a call to\n this function, i.e. `a>>b` is the same as\n `predef::`>>(a,b)`.\n\nIf `arg1` is an object that implements ``>>`, that\n function will be called with `arg2` as the single argument.\n\nIf `arg2` is an object that implements ```>>`, that\n function will be called with `arg1` as the single argument.\n\nOtherwise `arg1` will be shifted `arg2` bits right.",
385
+ "params": [
386
+ {
387
+ "name": "arg1",
388
+ "type": "int"
389
+ },
390
+ {
391
+ "name": "arg2",
392
+ "type": "int"
393
+ }
394
+ ],
395
+ "returnType": "int"
396
+ },
397
+ "`[..]": {
398
+ "signature": "scope(0,function(string, int, int(0..2), int, int(0..2) : string) | function(array((0=mixed)), int, int(0..2), int, int(0..2) : array(0)) | function(object, mixed, int(0..2), mixed, int(0..2) : mixed))",
399
+ "markdown": "Extracts a subrange.\n\nThis is the function form of expressions with the `[..]`\n operator. `arg` is the thing from which the subrange is to be\n extracted. `start` is the lower bound of the subrange and\n `end` the upper bound.\n\n`start_type` and `end_type` specifies how the `start` and\n `end` indices, respectively, are to be interpreted. The types\n are either `INDEX_FROM_BEG`, `INDEX_FROM_END` or\n `OPEN_BOUND`. In the last case, the index value is\n insignificant.\n\nThe relation between `[..]` expressions and this function\n is therefore as follows:\n\nThe subrange is specified as follows by the two bounds:",
400
+ "params": [
401
+ {
402
+ "name": "arg",
403
+ "type": "object"
404
+ },
405
+ {
406
+ "name": "start",
407
+ "type": "mixed"
408
+ },
409
+ {
410
+ "name": "start_type",
411
+ "type": "int"
412
+ },
413
+ {
414
+ "name": "end",
415
+ "type": "mixed"
416
+ },
417
+ {
418
+ "name": "end_type",
419
+ "type": "int"
420
+ }
421
+ ],
422
+ "returnType": "mixed"
423
+ },
424
+ "`[]": {
425
+ "signature": "scope(0,function(object, mixed, void | mixed : mixed) | function(int, string : function) | function(string, int : int) | function(array((0=mixed)), mixed : 0) | function(mapping(mixed:(1=mixed)), mixed : 1) | function(multiset, mixed : int(1bit)) | function(program, string : mixed) | function(string, int, int : string) | function(array((2=mixed)), int, int : array(2)))",
426
+ "markdown": "Indexing.\n\nThis is the function form of expressions with the `[]`\n operator, i.e. `a[i]` is the same as\n `predef::`[](a,i)`.",
427
+ "params": [
428
+ {
429
+ "name": "arg",
430
+ "type": "object"
431
+ },
432
+ {
433
+ "name": "index",
434
+ "type": "mixed"
435
+ }
436
+ ],
437
+ "returnType": "mixed"
438
+ },
439
+ "`[]=": {
440
+ "signature": "scope(0,function(object, string, (0=mixed) : 0) | function(array((1=mixed)), int, 1 : 1) | function(mapping((2=mixed):(3=mixed)), 2, 3 : 3) | function(multiset((4=mixed)), 4, (5=mixed) : 5))",
441
+ "markdown": "Index assignment.\n\nEvery lvalue expression with the `[]` operator becomes a\n call to this function, i.e. `a[b]=c` is the same as\n `predef::`[]=(a,b,c)`.\n\nIf `arg` is an object that implements ``[]=`, that function\n will be called with `index` and `val` as the arguments.",
442
+ "params": [
443
+ {
444
+ "name": "arg",
445
+ "type": "object"
446
+ },
447
+ {
448
+ "name": "index",
449
+ "type": "mixed"
450
+ },
451
+ {
452
+ "name": "val",
453
+ "type": "mixed"
454
+ }
455
+ ],
456
+ "returnType": "mixed"
457
+ },
458
+ "`^": {
459
+ "signature": "scope(0,function(int, int ... : int) | function(object, mixed ... : mixed) | function(mixed, object, mixed ... : mixed) | function((1=mapping), (2=mapping) ... : 1 | 2) | function((3=multiset), (4=multiset) ... : 3 | 4) | function((5=array), (6=array) ... : 5 | 6) | function(string, string ... : string) | function(program | type(mixed), program | type(mixed) ... : type(mixed)))",
460
+ "markdown": "Exclusive or.\n\nEvery expression with the `^` operator becomes a call to\n this function, i.e. `a^b` is the same as\n `predef::`^(a,b)`.",
461
+ "params": [
462
+ {
463
+ "name": "arg1",
464
+ "type": "mixed"
465
+ }
466
+ ],
467
+ "returnType": "mixed"
468
+ },
469
+ "`|": {
470
+ "signature": "scope(0,function(int, int ... : int) | function(object, mixed ... : mixed) | function(mixed, object, mixed ... : mixed) | function((1=mapping), (2=mapping) ... : 1 | 2) | function((3=multiset), (4=multiset) ... : 3 | 4) | function((5=array), (6=array) ... : 5 | 6) | function(string, string ... : string) | function(program | type(mixed), program | type(mixed) ... : type(mixed)))",
471
+ "markdown": "Bitwise or/union.\n\nEvery expression with the `|` operator becomes a call to\n this function, i.e. `a|b` is the same as\n `predef::`|(a,b)`.",
472
+ "params": [
473
+ {
474
+ "name": "arg1",
475
+ "type": "mixed"
476
+ }
477
+ ],
478
+ "returnType": "mixed"
479
+ },
480
+ "`~": {
481
+ "signature": "scope(0,function(object : mixed) | function(int : int) | function(string : string) | function(float : float) | function(type((0=mixed)) : type(!0)) | function(program : type(mixed)))",
482
+ "markdown": "Complement/inversion.\n\nEvery expression with the `~` operator becomes a call to\n this function, i.e. `~a` is the same as\n `predef::`~(a)`.",
483
+ "params": [
484
+ {
485
+ "name": "arg",
486
+ "type": "object"
487
+ }
488
+ ],
489
+ "returnType": "mixed"
490
+ },
491
+ "abs": {
492
+ "signature": "scope(0,function((0=int | float | object) : 0))",
493
+ "markdown": "Return the absolute value for `f`. If `f` is\n an object it must implement ``<` and\n unary ``-`.",
494
+ "params": [
495
+ {
496
+ "name": "f",
497
+ "type": "float"
498
+ }
499
+ ],
500
+ "returnType": "float"
501
+ },
502
+ "access": {
503
+ "signature": "function(string, void | string : int)",
504
+ "markdown": "access() checks if the calling process can access the file\n `path`. Symbolic links are dereferenced.",
505
+ "params": [
506
+ {
507
+ "name": "path",
508
+ "type": "string"
509
+ },
510
+ {
511
+ "name": "mode",
512
+ "type": "string"
513
+ }
514
+ ],
515
+ "returnType": "int"
516
+ },
517
+ "acos": {
518
+ "signature": "function(int | float : float)",
519
+ "markdown": "Return the arcus cosine value for `f`.\n The result will be in radians.",
520
+ "params": [
521
+ {
522
+ "name": "f",
523
+ "type": "int | float"
524
+ }
525
+ ],
526
+ "returnType": "float"
527
+ },
528
+ "acosh": {
529
+ "signature": "function(int | float : float)",
530
+ "markdown": "Return the hyperbolic arcus cosine value for `f`.",
531
+ "params": [
532
+ {
533
+ "name": "f",
534
+ "type": "int | float"
535
+ }
536
+ ],
537
+ "returnType": "float"
538
+ },
539
+ "add_constant": {
540
+ "signature": "function(string, void | mixed : void)",
541
+ "markdown": "Add a new predefined constant.\n\nThis function is often used to add builtin functions.\n All programs compiled after the `add_constant` function has been\n called can access `value` by the name `name`.\n\nIf there is a constant called `name` already, it will be replaced by\n by the new definition. This will not affect already compiled programs.\n\nCalling `add_constant` without a value will remove that name from\n the list of constants. As with replacing, this will not affect already\n compiled programs.",
542
+ "params": [
543
+ {
544
+ "name": "name",
545
+ "type": "string"
546
+ },
547
+ {
548
+ "name": "value",
549
+ "type": "mixed"
550
+ }
551
+ ]
552
+ },
553
+ "aggregate": {
554
+ "signature": "scope(0,function((0=mixed) ... : array(0)))",
555
+ "markdown": "Construct an array with the arguments as indices.\n\nThis function could be written in Pike as:",
556
+ "params": [
557
+ {
558
+ "name": "elements",
559
+ "type": "mixed"
560
+ }
561
+ ],
562
+ "returnType": "array"
563
+ },
564
+ "aggregate_mapping": {
565
+ "signature": "scope(0,function((0=mixed) ... : mapping(0:0)))",
566
+ "markdown": "Construct a mapping.\n\nGroups the arguments together two and two in key-index pairs and\n creates a mapping of those pairs. Generally, the mapping literal\n syntax is handier: `([ key1:val1, key2:val2, ... ])`",
567
+ "params": [
568
+ {
569
+ "name": "elems",
570
+ "type": "mixed"
571
+ }
572
+ ],
573
+ "returnType": "mapping"
574
+ },
575
+ "aggregate_multiset": {
576
+ "signature": "scope(0,function((0=mixed) ... : multiset(0)))",
577
+ "markdown": "Construct a multiset with the arguments as indices. The multiset\n will not contain any values. This method is most useful when\n constructing multisets with `map` or similar; generally, the\n multiset literal syntax is handier: `(<elem1, elem2, ...>)`\n With it, it's also possible to construct a multiset with values:\n `(<index1: value1, index2: value2, ...>)`",
578
+ "params": [
579
+ {
580
+ "name": "elems",
581
+ "type": "mixed"
582
+ }
583
+ ],
584
+ "returnType": "multiset"
585
+ },
586
+ "alarm": {
587
+ "signature": "function(int : int)",
588
+ "markdown": "Set an alarm clock for delivery of a signal.\n\n`alarm` arranges for a SIGALRM signal to be delivered to the\n process in `seconds` seconds.\n\nIf `seconds` is `0` (zero), no new alarm will be scheduled.\n\nAny previous alarms will in any case be canceled.",
589
+ "params": [
590
+ {
591
+ "name": "seconds",
592
+ "type": "int"
593
+ }
594
+ ],
595
+ "returnType": "int"
596
+ },
597
+ "all_constants": {
598
+ "signature": "function( : mapping(string:mixed))",
599
+ "markdown": "Returns a mapping containing all global constants, indexed on the name\n of the constant, and with the value of the constant as value.",
600
+ "returnType": "mapping"
601
+ },
602
+ "allocate": {
603
+ "signature": "scope(0,function(int, void | (0=mixed) : array(0)))",
604
+ "markdown": "Allocate an array of `size` elements. If `init` is specified\n then each element is initialized by copying that value\n recursively.",
605
+ "params": [
606
+ {
607
+ "name": "size",
608
+ "type": "int"
609
+ }
610
+ ],
611
+ "returnType": "array"
612
+ },
613
+ "array_sscanf": {
614
+ "signature": "function(string, __attribute__(\"sscanf_format\", string) : array(__attribute__(\"sscanf_args\", mixed)))",
615
+ "markdown": "This function works just like `sscanf`, but returns the matched\n results in an array instead of assigning them to lvalues. This is often\n useful for user-defined sscanf strings.",
616
+ "params": [
617
+ {
618
+ "name": "data",
619
+ "type": "string"
620
+ },
621
+ {
622
+ "name": "format",
623
+ "type": "string"
624
+ }
625
+ ],
626
+ "returnType": "array"
627
+ },
628
+ "arrayp": {
629
+ "signature": "function(mixed : int(1bit))",
630
+ "markdown": "Returns `1` if `arg` is an array, `0` (zero) otherwise.",
631
+ "params": [
632
+ {
633
+ "name": "arg",
634
+ "type": "mixed"
635
+ }
636
+ ],
637
+ "returnType": "int"
638
+ },
639
+ "asin": {
640
+ "signature": "function(int | float : float)",
641
+ "markdown": "Return the arcus sine value for `f`.\n The result will be in radians.",
642
+ "params": [
643
+ {
644
+ "name": "f",
645
+ "type": "int | float"
646
+ }
647
+ ],
648
+ "returnType": "float"
649
+ },
650
+ "asinh": {
651
+ "signature": "function(int | float : float)",
652
+ "markdown": "Return the hyperbolic arcus sine value for `f`.",
653
+ "params": [
654
+ {
655
+ "name": "f",
656
+ "type": "int | float"
657
+ }
658
+ ],
659
+ "returnType": "float"
660
+ },
661
+ "atan": {
662
+ "signature": "function(int | float : float)",
663
+ "markdown": "Returns the arcus tangent value for `f`.\n The result will be in radians.",
664
+ "params": [
665
+ {
666
+ "name": "f",
667
+ "type": "int | float"
668
+ }
669
+ ],
670
+ "returnType": "float"
671
+ },
672
+ "atan2": {
673
+ "signature": "function(float, float : float)",
674
+ "markdown": "Returns the arcus tangent value for `f1`/`f2`, and uses\n the signs of `f1` and `f2` to determine the quadrant.\n The result will be in radians.",
675
+ "params": [
676
+ {
677
+ "name": "f1",
678
+ "type": "float"
679
+ },
680
+ {
681
+ "name": "f2",
682
+ "type": "float"
683
+ }
684
+ ],
685
+ "returnType": "float"
686
+ },
687
+ "atanh": {
688
+ "signature": "function(int | float : float)",
689
+ "markdown": "Returns the hyperbolic arcus tangent value for `f`.",
690
+ "params": [
691
+ {
692
+ "name": "f",
693
+ "type": "int | float"
694
+ }
695
+ ],
696
+ "returnType": "float"
697
+ },
698
+ "atexit": {
699
+ "signature": "function(mixed : void)",
700
+ "markdown": "This function puts the `callback` in a queue of callbacks to\n call when pike exits. The call order is reversed, i.e. callbacks\n that have been added earlier are called after `callback`.",
701
+ "params": [
702
+ {
703
+ "name": "callback",
704
+ "type": "function"
705
+ }
706
+ ]
707
+ },
708
+ "backtrace": {
709
+ "signature": "function( : array)",
710
+ "markdown": "FIXME: This documentation is not up to date!\n\nGet a description of the current call stack.\n\nThe description is returned as an array with one entry for each call\n frame on the stack.\n\nEach entry has this format:\n\nThe current call frame will be last in the array.",
711
+ "returnType": "array"
712
+ },
713
+ "basename": {
714
+ "signature": "function(string : string)",
715
+ "markdown": "Returns the last segment of a path.",
716
+ "params": [
717
+ {
718
+ "name": "x",
719
+ "type": "string"
720
+ }
721
+ ],
722
+ "returnType": "string"
723
+ },
724
+ "basetype": {
725
+ "signature": "function(mixed : string)",
726
+ "markdown": "Same as sprintf(\"%t\",x);",
727
+ "params": [
728
+ {
729
+ "name": "x",
730
+ "type": "mixed"
731
+ }
732
+ ],
733
+ "returnType": "string"
734
+ },
735
+ "callablep": {
736
+ "signature": "function(mixed : int(1bit))",
737
+ "markdown": "Returns `1` if `arg` is a callable, `0` (zero) otherwise.",
738
+ "params": [
739
+ {
740
+ "name": "arg",
741
+ "type": "mixed"
742
+ }
743
+ ],
744
+ "returnType": "int"
745
+ },
746
+ "cd": {
747
+ "signature": "function(string : int)",
748
+ "markdown": "Change the current directory for the whole Pike process.",
749
+ "params": [
750
+ {
751
+ "name": "s",
752
+ "type": "string"
753
+ }
754
+ ],
755
+ "returnType": "int"
756
+ },
757
+ "ceil": {
758
+ "signature": "function(int | float : float)",
759
+ "markdown": "Return the closest integer value greater or equal to `f`.",
760
+ "params": [
761
+ {
762
+ "name": "f",
763
+ "type": "int | float"
764
+ }
765
+ ],
766
+ "returnType": "float"
767
+ },
768
+ "column": {
769
+ "signature": "function(array, mixed : array)",
770
+ "markdown": "Extract a column from a two-dimensional array.\n\nThis function is exactly equivalent to:\n\nExcept of course it is a lot shorter and faster.\n That is, it indices every index in the array data on the value of\n the argument index and returns an array with the results.",
771
+ "params": [
772
+ {
773
+ "name": "data",
774
+ "type": "array"
775
+ },
776
+ {
777
+ "name": "index",
778
+ "type": "mixed"
779
+ }
780
+ ],
781
+ "returnType": "array"
782
+ },
783
+ "compile": {
784
+ "signature": "function(string, void | object, void | int, void | int, void | program, void | object : program)",
785
+ "markdown": "Compile a string to a program.\n\nThis function takes a piece of Pike code as a string and\n compiles it into a clonable program.\n\nThe optional argument `handler` is used to specify an alternative\n error handler. If it is not specified the current master object will\n be used.\n\nThe optional arguments `major` and `minor` are used to tell the\n compiler to attempt to be compatible with Pike `major`.`minor`.",
786
+ "params": [
787
+ {
788
+ "name": "source",
789
+ "type": "string"
790
+ },
791
+ {
792
+ "name": "handler",
793
+ "type": "object"
794
+ },
795
+ {
796
+ "name": "major",
797
+ "type": "int"
798
+ },
799
+ {
800
+ "name": "minor",
801
+ "type": "int"
802
+ },
803
+ {
804
+ "name": "target",
805
+ "type": "program"
806
+ },
807
+ {
808
+ "name": "placeholder",
809
+ "type": "object"
810
+ }
811
+ ],
812
+ "returnType": "program"
813
+ },
814
+ "compile_file": {
815
+ "signature": "function(string, void | object, void | program, void | object : program)",
816
+ "markdown": "Compile the Pike code contained in the file `filename` into a program.\n\nThis function will compile the file `filename` to a Pike program that can\n later be instantiated. It is the same as doing\n ``.",
817
+ "params": [
818
+ {
819
+ "name": "filename",
820
+ "type": "string"
821
+ },
822
+ {
823
+ "name": "handler",
824
+ "type": "object"
825
+ },
826
+ {
827
+ "name": "p",
828
+ "type": "program"
829
+ },
830
+ {
831
+ "name": "o",
832
+ "type": "object"
833
+ }
834
+ ],
835
+ "returnType": "program"
836
+ },
837
+ "compile_string": {
838
+ "signature": "function(string, void | string, void | object, void | program, void | object, void | int : program)",
839
+ "markdown": "Compile the Pike code in the string `source` into a program.\n If `filename` is not specified, it will default to `\"-\"`.\n\nFunctionally equal to ``.",
840
+ "params": [
841
+ {
842
+ "name": "source",
843
+ "type": "string"
844
+ },
845
+ {
846
+ "name": "filename",
847
+ "type": "string"
848
+ },
849
+ {
850
+ "name": "handler",
851
+ "type": "object"
852
+ },
853
+ {
854
+ "name": "p",
855
+ "type": "program"
856
+ },
857
+ {
858
+ "name": "o",
859
+ "type": "object"
860
+ },
861
+ {
862
+ "name": "_show_if_constant_errors",
863
+ "type": "int"
864
+ }
865
+ ],
866
+ "returnType": "program"
867
+ },
868
+ "copy_value": {
869
+ "signature": "scope(0,function((1=mixed) : 1))",
870
+ "markdown": "Copy a value recursively.\n\nIf the result value is changed destructively (only possible for\n multisets, arrays and mappings) the copied value will not be changed.\n\nThe resulting value will always be equal to the copied (as tested with\n the function `equal`), but they may not the the same value (as tested\n with ``==`).",
871
+ "params": [
872
+ {
873
+ "name": "value",
874
+ "type": "mixed"
875
+ }
876
+ ],
877
+ "returnType": "mixed"
878
+ },
879
+ "cos": {
880
+ "signature": "function(int | float : float)",
881
+ "markdown": "Return the cosine value for `f`.\n `f` should be specified in radians.",
882
+ "params": [
883
+ {
884
+ "name": "f",
885
+ "type": "int | float"
886
+ }
887
+ ],
888
+ "returnType": "float"
889
+ },
890
+ "cosh": {
891
+ "signature": "function(int | float : float)",
892
+ "markdown": "Return the hyperbolic cosine value for `f`.",
893
+ "params": [
894
+ {
895
+ "name": "f",
896
+ "type": "int | float"
897
+ }
898
+ ],
899
+ "returnType": "float"
900
+ },
901
+ "cpp": {
902
+ "signature": "function(string, void | mapping | string, void | int | string, void | object, void | int, void | int, void | int : string)",
903
+ "markdown": "Run a string through the preprocessor.\n\nPreprocesses the string `data` with Pike's builtin ANSI-C look-alike\n preprocessor. If the `current_file` argument has not been specified,\n it will default to `\"-\"`. `charset` defaults to `\"ISO-10646\"`.\n\nIf the second argument is a mapping, no other arguments may follow.\n Instead, they have to be given as members of the mapping (if wanted).\n The following members are recognized:",
904
+ "params": [
905
+ {
906
+ "name": "data",
907
+ "type": "string"
908
+ },
909
+ {
910
+ "name": "current_file",
911
+ "type": "mapping | string"
912
+ },
913
+ {
914
+ "name": "charset",
915
+ "type": "int | string"
916
+ },
917
+ {
918
+ "name": "handler",
919
+ "type": "object"
920
+ },
921
+ {
922
+ "name": "compat_major",
923
+ "type": "int"
924
+ },
925
+ {
926
+ "name": "compat_minor",
927
+ "type": "int"
928
+ },
929
+ {
930
+ "name": "picky_cpp",
931
+ "type": "int"
932
+ }
933
+ ],
934
+ "returnType": "string"
935
+ },
936
+ "crypt": {
937
+ "signature": "scope(0,function(string : string(7bit)) | function(string, string : int(1bit)))",
938
+ "markdown": "This function crypts and verifies a short string (only the first\n 8 characters are significant).\n\nThe first syntax crypts the string `password` into something that\n is hopefully hard to decrypt.\n\nThe second syntax is used to verify `typed_password` against\n `crypted_password`, and returns `1` if they match, and\n `0` (zero) otherwise.",
939
+ "params": [
940
+ {
941
+ "name": "password",
942
+ "type": "string"
943
+ }
944
+ ],
945
+ "returnType": "string"
946
+ },
947
+ "ctime": {
948
+ "signature": "function(int : string)",
949
+ "markdown": "Convert the output from a previous call to `time` into a readable\n string containing the current year, month, day and time.\n\nLike `localtime`, this function might throw an error if the\n ctime(2) call failed on the system. It's platform dependent what\n time ranges that function can handle, e.g. Windows doesn't handle\n a negative `timestamp`.",
950
+ "params": [
951
+ {
952
+ "name": "timestamp",
953
+ "type": "int"
954
+ }
955
+ ],
956
+ "returnType": "string"
957
+ },
958
+ "decode_value": {
959
+ "signature": "function(string, void | object : mixed)",
960
+ "markdown": "Decode a value from the string `coded_value`.\n\nThis function takes a string created with `encode_value` or\n `encode_value_canonic` and converts it back to the value that was\n coded.\n\nIf `codec` is specified, it's used as the codec for the decode.\n If none is specified, then one is instantiated through\n `master()->Decoder()`. As a compatibility fallback, the\n master itself is used if it has no `Decoder` class.",
961
+ "params": [
962
+ {
963
+ "name": "coded_value",
964
+ "type": "string"
965
+ },
966
+ {
967
+ "name": "codec",
968
+ "type": "object"
969
+ }
970
+ ],
971
+ "returnType": "mixed"
972
+ },
973
+ "delay": {
974
+ "signature": "function(int | float, void | int : void)",
975
+ "markdown": "This function makes the program stop for `s` seconds.\n\nOnly signal handlers can interrupt the sleep. Other callbacks are\n not called during delay. Beware that this function uses busy-waiting\n to achieve the highest possible accuracy.",
976
+ "params": [
977
+ {
978
+ "name": "s",
979
+ "type": "int | float"
980
+ }
981
+ ]
982
+ },
983
+ "describe_backtrace": {
984
+ "signature": "function(mixed, void | int : string)",
985
+ "markdown": "Return a readable message that describes where the backtrace\n `trace` was made (by `backtrace`).\n\nIt may also be an error object or array (typically caught by a\n `catch`), in which case the error message also is included in the\n description.\n\nPass `linewidth` -1 to disable wrapping of the output.",
986
+ "params": [
987
+ {
988
+ "name": "trace",
989
+ "type": "mixed"
990
+ },
991
+ {
992
+ "name": "linewidth",
993
+ "type": "int"
994
+ }
995
+ ],
996
+ "returnType": "string"
997
+ },
998
+ "describe_error": {
999
+ "signature": "function(mixed : string)",
1000
+ "markdown": "Return the error message from an error object or array (typically\n caught by a `catch`). The type of the error is checked, hence\n `err` is declared as `mixed` and not `object|array`.\n\nIf an error message couldn't be obtained, a fallback message\n describing the failure is returned. No errors due to incorrectness\n in `err` are thrown.",
1001
+ "params": [
1002
+ {
1003
+ "name": "err",
1004
+ "type": "mixed"
1005
+ }
1006
+ ],
1007
+ "returnType": "string"
1008
+ },
1009
+ "destruct": {
1010
+ "signature": "function(void | object : void)",
1011
+ "markdown": "Mark an object as destructed.\n\nCalls `o->destroy()`, and then clears all variables in the\n object. If no argument is given, the current object is destructed.\n\nAll pointers and function pointers to this object will become zero.\n The destructed object will be freed from memory as soon as possible.",
1012
+ "params": [
1013
+ {
1014
+ "name": "o",
1015
+ "type": "object"
1016
+ }
1017
+ ]
1018
+ },
1019
+ "destructedp": {
1020
+ "signature": "function(mixed : int(1bit))",
1021
+ "markdown": "Returns `1` if `arg` is a destructed object, `0`\n (zero) otherwise.",
1022
+ "params": [
1023
+ {
1024
+ "name": "arg",
1025
+ "type": "mixed"
1026
+ }
1027
+ ],
1028
+ "returnType": "int"
1029
+ },
1030
+ "dirname": {
1031
+ "signature": "function(string : string)",
1032
+ "markdown": "Returns all but the last segment of a path. Some example inputs and\n outputs:\n\n**Expression****Value**\n dirname(\"/a/b\")\"/a\"\n dirname(\"/a/\")\"/a\"\n dirname(\"/a\")\"/\"\n dirname(\"/\")\"/\"\n dirname(\"\")\"\"",
1033
+ "params": [
1034
+ {
1035
+ "name": "x",
1036
+ "type": "string"
1037
+ }
1038
+ ],
1039
+ "returnType": "string"
1040
+ },
1041
+ "encode_value": {
1042
+ "signature": "function(mixed, void | object : string(8bit))",
1043
+ "markdown": "Code a value into a string.\n\nThis function takes a value, and converts it to a string. This string\n can then be saved, sent to another Pike process, packed or used in\n any way you like. When you want your value back you simply send this\n string to `decode_value` and it will return the value you encoded.\n\nAlmost any value can be coded, mappings, floats, arrays, circular\n structures etc.\n\nIf `codec` is specified, it's used as the codec for the encode.\n If none is specified, then one is instantiated through\n `master()->Encoder()`. As a compatibility fallback, the\n master itself is used if it has no `Encoder` class.\n\nIf `` returns `UNDEFINED` for an\n object, `val = o->encode_object(o)` will be called. The\n returned value will be passed to `o->decode_object(o, val)`\n when the object is decoded.",
1044
+ "params": [
1045
+ {
1046
+ "name": "value",
1047
+ "type": "mixed"
1048
+ },
1049
+ {
1050
+ "name": "codec",
1051
+ "type": "object"
1052
+ }
1053
+ ],
1054
+ "returnType": "string"
1055
+ },
1056
+ "encode_value_canonic": {
1057
+ "signature": "function(mixed, void | object : string(8bit))",
1058
+ "markdown": "Code a value into a string on canonical form.\n\nTakes a value and converts it to a string on canonical form, much like\n `encode_value`. The canonical form means that if an identical value is\n encoded, it will produce exactly the same string again, even if it's\n done at a later time and/or in another Pike process. The produced\n string is compatible with `decode_value`.",
1059
+ "params": [
1060
+ {
1061
+ "name": "value",
1062
+ "type": "mixed"
1063
+ },
1064
+ {
1065
+ "name": "codec",
1066
+ "type": "object"
1067
+ }
1068
+ ],
1069
+ "returnType": "string"
1070
+ },
1071
+ "enumerate": {
1072
+ "signature": "scope(0,function(int(0..2147483647), float, void | int | float : array(float)) | function(int(0..2147483647) : array(int)) | function(int(0..2147483647), int : array(int)) | function(int(0..2147483647), int | float, float : array(float)) | function(int(0..2147483647), int, void | int : array(int)) | function(int(0..2147483647), mixed, object : array(1)) | function(int(0..2147483647), object, void | mixed : array(1)) | function(int(0..2147483647), mixed, mixed, function(mixed ... : (1=mixed)) : array(1)))",
1073
+ "markdown": "Create an array with an enumeration, useful for initializing arrays\n or as first argument to `map` or `foreach()`.\n\nThe defaults are: `step` = 1, `start` = 0, `operator` = ``+`",
1074
+ "params": [
1075
+ {
1076
+ "name": "n",
1077
+ "type": "int"
1078
+ }
1079
+ ],
1080
+ "returnType": "array"
1081
+ },
1082
+ "equal": {
1083
+ "signature": "function(mixed, mixed : int(1bit))",
1084
+ "markdown": "This function checks if the values `a` and `b` are equal.\n\nFor all types but arrays, multisets and mappings, this operation is\n the same as doing ``.\n For arrays, mappings and multisets however, their contents are checked\n recursively, and if all their contents are the same and in the same\n place, they are considered equal.",
1085
+ "params": [
1086
+ {
1087
+ "name": "a",
1088
+ "type": "mixed"
1089
+ },
1090
+ {
1091
+ "name": "b",
1092
+ "type": "mixed"
1093
+ }
1094
+ ],
1095
+ "returnType": "int"
1096
+ },
1097
+ "errno": {
1098
+ "signature": "function( : int)",
1099
+ "markdown": "This function returns the system error from the last file operation.",
1100
+ "returnType": "int"
1101
+ },
1102
+ "error": {
1103
+ "signature": "function({ sprintf_format = __attribute__(\"sprintf_format\", object | string) }, { sprintf_args = __attribute__(\"sprintf_args\", mixed) } ... : void)",
1104
+ "markdown": "Throws an error. A more readable version of the code\n `throw( ({ sprintf(f, @args), backtrace() }) )`.",
1105
+ "params": [
1106
+ {
1107
+ "name": "f",
1108
+ "type": "object"
1109
+ },
1110
+ {
1111
+ "name": "args",
1112
+ "type": "mixed"
1113
+ }
1114
+ ]
1115
+ },
1116
+ "exece": {
1117
+ "signature": "function(string, array, void | mapping(string:string) : int)",
1118
+ "markdown": "This function transforms the Pike process into a process running\n the program specified in the argument `file` with the arguments `args`.\n\nIf the mapping `env` is present, it will completely replace all\n environment variables before the new program is executed.",
1119
+ "params": [
1120
+ {
1121
+ "name": "file",
1122
+ "type": "string"
1123
+ },
1124
+ {
1125
+ "name": "args",
1126
+ "type": "array"
1127
+ }
1128
+ ],
1129
+ "returnType": "int"
1130
+ },
1131
+ "exit": {
1132
+ "signature": "function(int, void | string, void | mixed ... : void)",
1133
+ "markdown": "Exit the whole Pike program with the given `returncode`.\n\nUsing `exit` with any other value than `0` (zero) indicates\n that something went wrong during execution. See your system manuals\n for more information about return codes.\n\nThe arguments after the `returncode` will be used for a call to\n `werror` to output a message on stderr.",
1134
+ "params": [
1135
+ {
1136
+ "name": "returncode",
1137
+ "type": "int"
1138
+ },
1139
+ {
1140
+ "name": "fmt",
1141
+ "type": "string"
1142
+ },
1143
+ {
1144
+ "name": "extra",
1145
+ "type": "mixed"
1146
+ }
1147
+ ]
1148
+ },
1149
+ "exp": {
1150
+ "signature": "function(int | float : float)",
1151
+ "markdown": "Return the natural exponential of `f`.\n `log( exp( x ) ) == x` as long as exp(x) doesn't overflow an int.",
1152
+ "params": [
1153
+ {
1154
+ "name": "f",
1155
+ "type": "float | int"
1156
+ }
1157
+ ],
1158
+ "returnType": "float"
1159
+ },
1160
+ "explode_path": {
1161
+ "signature": "function(string : array(string))",
1162
+ "markdown": "Split a path `p` into its components.\n\nThis function divides a path into its components. This might seem like\n it could be done by dividing the string on <tt>\"/\"</tt>, but that will\n not work on some operating systems. To turn the components back into\n a path again, use `combine_path`.",
1163
+ "params": [
1164
+ {
1165
+ "name": "p",
1166
+ "type": "string"
1167
+ }
1168
+ ],
1169
+ "returnType": "array"
1170
+ },
1171
+ "file_stat": {
1172
+ "signature": "function(string, void | int : object(is _static_modules._Stdio()->Stat))",
1173
+ "markdown": "Stat a file.\n\nIf the argument `symlink` is `1` symlinks will not be followed.",
1174
+ "params": [
1175
+ {
1176
+ "name": "path",
1177
+ "type": "string"
1178
+ },
1179
+ {
1180
+ "name": "symlink",
1181
+ "type": "mixed"
1182
+ }
1183
+ ],
1184
+ "returnType": "object"
1185
+ },
1186
+ "file_truncate": {
1187
+ "signature": "function(string, int : int)",
1188
+ "markdown": "Truncates the file `file` to the length specified in `length`.",
1189
+ "params": [
1190
+ {
1191
+ "name": "file",
1192
+ "type": "string"
1193
+ },
1194
+ {
1195
+ "name": "length",
1196
+ "type": "int"
1197
+ }
1198
+ ],
1199
+ "returnType": "int"
1200
+ },
1201
+ "filesystem_stat": {
1202
+ "signature": "function(string : mapping(string:int | string))",
1203
+ "markdown": "Returns a mapping describing the properties of the filesystem\n containing the path specified by `path`.",
1204
+ "params": [
1205
+ {
1206
+ "name": "path",
1207
+ "type": "string"
1208
+ }
1209
+ ],
1210
+ "returnType": "mapping"
1211
+ },
1212
+ "filter": {
1213
+ "signature": "scope(0,function(object, mixed ... : mixed) | function((1=array | mapping | multiset | string), mixed ... : 1) | function(function | program, mixed ... : mapping(string:mixed)))",
1214
+ "markdown": "Filters the elements in `arr` through `fun`.\n\n`arr` is treated as a set of elements to be filtered, as\n follows:\n\nUnless something else is mentioned above, `fun` is used as\n filter like this:",
1215
+ "params": [
1216
+ {
1217
+ "name": "arr",
1218
+ "type": "mixed"
1219
+ },
1220
+ {
1221
+ "name": "fun",
1222
+ "type": "mixed"
1223
+ },
1224
+ {
1225
+ "name": "extra",
1226
+ "type": "mixed"
1227
+ }
1228
+ ],
1229
+ "returnType": "mixed"
1230
+ },
1231
+ "floatp": {
1232
+ "signature": "function(mixed : int(1bit))",
1233
+ "markdown": "Returns `1` if `arg` is a float, `0` (zero) otherwise.",
1234
+ "params": [
1235
+ {
1236
+ "name": "arg",
1237
+ "type": "mixed"
1238
+ }
1239
+ ],
1240
+ "returnType": "int"
1241
+ },
1242
+ "floor": {
1243
+ "signature": "function(int | float : float)",
1244
+ "markdown": "Return the closest integer value less or equal to `f`.",
1245
+ "params": [
1246
+ {
1247
+ "name": "f",
1248
+ "type": "int | float"
1249
+ }
1250
+ ],
1251
+ "returnType": "float"
1252
+ },
1253
+ "fork": {
1254
+ "signature": "function(void : object)",
1255
+ "markdown": "Fork the process in two.\n\nFork splits the process in two, and for the parent it returns a\n pid object for the child. Refer to your Unix manual for further\n details.",
1256
+ "returnType": "object"
1257
+ },
1258
+ "function_name": {
1259
+ "signature": "function(function(mixed ... : void | mixed) | program : string)",
1260
+ "markdown": "Return the name of the function or program `f`.\n\nIf `f` is a global function defined in the runtime `0`\n (zero) will be returned.",
1261
+ "params": [
1262
+ {
1263
+ "name": "f",
1264
+ "type": "function | program"
1265
+ }
1266
+ ],
1267
+ "returnType": "string"
1268
+ },
1269
+ "function_object": {
1270
+ "signature": "function(function(mixed ... : void | mixed) : object)",
1271
+ "markdown": "Return the object the function `f` is in.\n\nIf `f` is a global function defined in the runtime `0`\n (zero) will be returned.\n\nZero will also be returned if `f` is a constant in the\n parent class. In that case `function_program` can be\n used to get the parent program.",
1272
+ "params": [
1273
+ {
1274
+ "name": "f",
1275
+ "type": "function"
1276
+ }
1277
+ ],
1278
+ "returnType": "object"
1279
+ },
1280
+ "function_program": {
1281
+ "signature": "function(function(mixed ... : void | mixed) | program : program)",
1282
+ "markdown": "Return the program the function `f` is in.\n\nIf `f` is a global function defined in the runtime `0`\n (zero) will be returned.",
1283
+ "params": [
1284
+ {
1285
+ "name": "f",
1286
+ "type": "function | program"
1287
+ }
1288
+ ],
1289
+ "returnType": "program"
1290
+ },
1291
+ "functionp": {
1292
+ "signature": "function(mixed : int(1bit))",
1293
+ "markdown": "Returns `1` if `arg` is a function, `0` (zero) otherwise.",
1294
+ "params": [
1295
+ {
1296
+ "name": "arg",
1297
+ "type": "mixed"
1298
+ }
1299
+ ],
1300
+ "returnType": "int"
1301
+ },
1302
+ "gc": {
1303
+ "signature": "function(void | mixed : int)",
1304
+ "markdown": "Force garbage collection.",
1305
+ "params": [
1306
+ {
1307
+ "name": "quick",
1308
+ "type": "mapping"
1309
+ }
1310
+ ],
1311
+ "returnType": "int"
1312
+ },
1313
+ "get_active_compilation_handler": {
1314
+ "signature": "function( : object)",
1315
+ "markdown": "Returns the currently active compilation compatibility handler, or\n `0` (zero) if none is active.",
1316
+ "returnType": "object"
1317
+ },
1318
+ "get_active_error_handler": {
1319
+ "signature": "function( : object)",
1320
+ "markdown": "Returns the currently active compilation error handler\n (second argument to `compile`), or `0` (zero) if none\n is active.",
1321
+ "returnType": "object"
1322
+ },
1323
+ "get_all_groups": {
1324
+ "signature": "function(void : array(array(int | array(string) | string)))",
1325
+ "markdown": "Returns an array of arrays with all groups in the system groups source.\n Each element in the returned array has the same structure as in\n `getgrent` function.",
1326
+ "returnType": "array"
1327
+ },
1328
+ "get_all_users": {
1329
+ "signature": "function(void : array(array(int | string)))",
1330
+ "markdown": "Returns an array with all users in the system.",
1331
+ "returnType": "array"
1332
+ },
1333
+ "get_backtrace": {
1334
+ "signature": "function(array | object : array)",
1335
+ "markdown": "Return the backtrace array from an error object or array\n (typically caught by a `catch`), or zero if there is none. Errors\n are thrown on if there are problems retrieving the backtrace.",
1336
+ "params": [
1337
+ {
1338
+ "name": "err",
1339
+ "type": "object | array"
1340
+ }
1341
+ ],
1342
+ "returnType": "array"
1343
+ },
1344
+ "get_dir": {
1345
+ "signature": "function(void | string : array(string))",
1346
+ "markdown": "Returns an array of all filenames in the directory `dirname`, or\n `0` (zero) if the directory does not exist. When no\n `dirname` is given, current work directory is used.",
1347
+ "params": [
1348
+ {
1349
+ "name": "dirname",
1350
+ "type": "string"
1351
+ }
1352
+ ],
1353
+ "returnType": "array"
1354
+ },
1355
+ "get_groups_for_user": {
1356
+ "signature": "function(int | string : array(int))",
1357
+ "markdown": "Gets all groups which a given user is a member of.",
1358
+ "params": [
1359
+ {
1360
+ "name": "user",
1361
+ "type": "int | string"
1362
+ }
1363
+ ],
1364
+ "returnType": "array"
1365
+ },
1366
+ "get_iterator": {
1367
+ "signature": "function(array | mapping | multiset | object | string : { Iterator = object(implements _static_modules.Builtin()->Iterator) })",
1368
+ "markdown": "Creates and returns a canonical iterator for `data`.",
1369
+ "params": [
1370
+ {
1371
+ "name": "data",
1372
+ "type": "object | array | mapping | multiset"
1373
+ }
1374
+ ],
1375
+ "returnType": "object"
1376
+ },
1377
+ "get_weak_flag": {
1378
+ "signature": "scope(0,function(array : int) | function(mapping : int) | function(multiset : int))",
1379
+ "markdown": "Returns the weak flag settings for `m`. It's a combination of\n `WEAK_INDICES` and `WEAK_VALUES`.",
1380
+ "params": [
1381
+ {
1382
+ "name": "m",
1383
+ "type": "array | mapping | multiset"
1384
+ }
1385
+ ],
1386
+ "returnType": "int"
1387
+ },
1388
+ "getcwd": {
1389
+ "signature": "function( : string)",
1390
+ "markdown": "Returns the current working directory.",
1391
+ "returnType": "string"
1392
+ },
1393
+ "getgrgid": {
1394
+ "signature": "function(int : array(int | array(string) | string))",
1395
+ "markdown": "Get the group entry for the group with the id `gid` using the systemfunction\n `getgrid(3)`.",
1396
+ "params": [
1397
+ {
1398
+ "name": "gid",
1399
+ "type": "int"
1400
+ }
1401
+ ],
1402
+ "returnType": "array"
1403
+ },
1404
+ "getgrnam": {
1405
+ "signature": "function(string : array(int | array(string) | string))",
1406
+ "markdown": "Get the group entry for the group with the name `str` using the\n systemfunction `getgrnam(3)`.",
1407
+ "params": [
1408
+ {
1409
+ "name": "str",
1410
+ "type": "string"
1411
+ }
1412
+ ],
1413
+ "returnType": "array"
1414
+ },
1415
+ "gethrdtime": {
1416
+ "signature": "function(void | int : int)",
1417
+ "markdown": "Return the high resolution real time spent with threads disabled\n since the Pike interpreter was started. The time is normally\n returned in microseconds, but if the optional argument `nsec`\n is nonzero it's returned in nanoseconds.",
1418
+ "params": [
1419
+ {
1420
+ "name": "nsec",
1421
+ "type": "int"
1422
+ }
1423
+ ],
1424
+ "returnType": "int"
1425
+ },
1426
+ "gethrtime": {
1427
+ "signature": "function(void | int : int)",
1428
+ "markdown": "Return the high resolution real time since some arbitrary event in\n the past. The time is normally returned in microseconds, but if\n the optional argument `nsec` is nonzero it's returned in\n nanoseconds.\n\nIt's system dependent whether or not this time is monotonic, i.e.\n if it's unaffected by adjustments of the calendaric clock in the\n system. `REAL_TIME_IS_MONOTONIC` tells what it is. Pike\n tries to use monotonic time for this function if it's available.",
1429
+ "params": [
1430
+ {
1431
+ "name": "nsec",
1432
+ "type": "int"
1433
+ }
1434
+ ],
1435
+ "returnType": "int"
1436
+ },
1437
+ "gethrvtime": {
1438
+ "signature": "function(void | int : int)",
1439
+ "markdown": "Return the CPU time that has been consumed by this process or\n thread. -1 is returned if the system couldn't determine it. The\n time is normally returned in microseconds, but if the optional\n argument `nsec` is nonzero it's returned in nanoseconds.\n\nThe CPU time includes both user and system time, i.e. it's\n approximately the same thing you would get by adding together the\n \"utime\" and \"stime\" fields returned by `getrusage` (but\n perhaps with better accuracy).\n\nIt's however system dependent whether or not it's the time\n consumed in all threads or in the current one only;\n `CPU_TIME_IS_THREAD_LOCAL` tells which. If both types are\n available then thread local time is preferred.",
1440
+ "params": [
1441
+ {
1442
+ "name": "nsec",
1443
+ "type": "int"
1444
+ }
1445
+ ],
1446
+ "returnType": "int"
1447
+ },
1448
+ "getpid": {
1449
+ "signature": "function( : int)",
1450
+ "markdown": "Returns the process ID of this process.",
1451
+ "returnType": "int"
1452
+ },
1453
+ "getpwnam": {
1454
+ "signature": "function(string : array(int | string))",
1455
+ "markdown": "Get the user entry for login `str` using the systemfunction `getpwnam(3)`.",
1456
+ "params": [
1457
+ {
1458
+ "name": "str",
1459
+ "type": "string"
1460
+ }
1461
+ ],
1462
+ "returnType": "array"
1463
+ },
1464
+ "getpwuid": {
1465
+ "signature": "function(int : array(int | string))",
1466
+ "markdown": "Get the user entry for UID `uid` using the systemfunction `getpwuid(3)`.",
1467
+ "params": [
1468
+ {
1469
+ "name": "uid",
1470
+ "type": "int"
1471
+ }
1472
+ ],
1473
+ "returnType": "array"
1474
+ },
1475
+ "getxattr": {
1476
+ "signature": "function(string, string, void | int : string)",
1477
+ "markdown": "Return the value of a specified attribute, or 0 if it does not exist.",
1478
+ "params": [
1479
+ {
1480
+ "name": "file",
1481
+ "type": "string"
1482
+ },
1483
+ {
1484
+ "name": "attr",
1485
+ "type": "string"
1486
+ },
1487
+ {
1488
+ "name": "symlink",
1489
+ "type": "mixed"
1490
+ }
1491
+ ],
1492
+ "returnType": "string"
1493
+ },
1494
+ "glob": {
1495
+ "signature": "scope(0,function(array(string) | string, string : int(1bit)) | function(array(string) | string, (1=array(string)) : 1))",
1496
+ "markdown": "Match strings against a glob pattern.",
1497
+ "params": [
1498
+ {
1499
+ "name": "glob",
1500
+ "type": "string"
1501
+ },
1502
+ {
1503
+ "name": "str",
1504
+ "type": "string"
1505
+ }
1506
+ ],
1507
+ "returnType": "int"
1508
+ },
1509
+ "gmtime": {
1510
+ "signature": "function(int : mapping(string:int))",
1511
+ "markdown": "Convert seconds since 00:00:00 UTC, Jan 1, 1970 into components.\n\nThis function works like `localtime` but the result is\n not adjusted for the local time zone.",
1512
+ "params": [
1513
+ {
1514
+ "name": "timestamp",
1515
+ "type": "int"
1516
+ }
1517
+ ],
1518
+ "returnType": "mapping"
1519
+ },
1520
+ "has_index": {
1521
+ "signature": "scope(0,function(string, int(0..2147483647) : int(1bit)) | function(array, int(0..2147483647) : int(1bit)) | function(multiset((0=mixed)), 0 : int(1bit)) | function(mapping((1=mixed):mixed), 1 : int(1bit)) | function(object, mixed : int(1bit)))",
1522
+ "markdown": "Search for `index` in `haystack`.",
1523
+ "params": [
1524
+ {
1525
+ "name": "haystack",
1526
+ "type": "string"
1527
+ },
1528
+ {
1529
+ "name": "index",
1530
+ "type": "int"
1531
+ }
1532
+ ],
1533
+ "returnType": "int"
1534
+ },
1535
+ "has_prefix": {
1536
+ "signature": "function(object | string, string : int(1bit))",
1537
+ "markdown": "Returns `1` if the string `s` starts with `prefix`,\n returns `0` (zero) otherwise.\n\nWhen `s` is an object, it needs to implement\n `_sizeof` and ``[]`.",
1538
+ "params": [
1539
+ {
1540
+ "name": "s",
1541
+ "type": "string | object"
1542
+ },
1543
+ {
1544
+ "name": "prefix",
1545
+ "type": "string"
1546
+ }
1547
+ ],
1548
+ "returnType": "int"
1549
+ },
1550
+ "has_suffix": {
1551
+ "signature": "function(string, string : int(1bit))",
1552
+ "markdown": "Returns `1` if the string `s` ends with `suffix`,\n returns `0` (zero) otherwise.",
1553
+ "params": [
1554
+ {
1555
+ "name": "s",
1556
+ "type": "string"
1557
+ },
1558
+ {
1559
+ "name": "suffix",
1560
+ "type": "string"
1561
+ }
1562
+ ],
1563
+ "returnType": "int"
1564
+ },
1565
+ "has_value": {
1566
+ "signature": "scope(0,function(object, mixed : int(1bit)) | function(string, int | string : int(1bit)) | function(array((0=mixed)), 0 : int(1bit)) | function(multiset, int : int(1bit)) | function(mapping(mixed:(1=mixed)), 1 : int(1bit)))",
1567
+ "markdown": "Search for `value` in `haystack`.",
1568
+ "params": [
1569
+ {
1570
+ "name": "haystack",
1571
+ "type": "string"
1572
+ },
1573
+ {
1574
+ "name": "value",
1575
+ "type": "string"
1576
+ }
1577
+ ],
1578
+ "returnType": "int"
1579
+ },
1580
+ "hash": {
1581
+ "signature": "function(string, void | int : int)",
1582
+ "markdown": "Return an integer derived from the string `s`. The same string\n always hashes to the same value, also between processes,\n architectures, and Pike versions (see compatibility notes below,\n though).\n\nIf `max` is given, the result will be >= 0 and < `max`,\n otherwise the result will be >= 0 and <= 0x7fffffff.",
1583
+ "params": [
1584
+ {
1585
+ "name": "s",
1586
+ "type": "string"
1587
+ }
1588
+ ],
1589
+ "returnType": "int"
1590
+ },
1591
+ "hash_7_0": {
1592
+ "signature": "function(string, void | int : int)",
1593
+ "markdown": "Return an integer derived from the string `s`. The same string\n always hashes to the same value, also between processes.\n\nIf `max` is given, the result will be >= 0 and < `max`,\n otherwise the result will be >= 0 and <= 0x7fffffff.",
1594
+ "params": [
1595
+ {
1596
+ "name": "s",
1597
+ "type": "string"
1598
+ }
1599
+ ],
1600
+ "returnType": "int"
1601
+ },
1602
+ "hash_7_4": {
1603
+ "signature": "function(string, void | int : int)",
1604
+ "markdown": "",
1605
+ "params": [
1606
+ {
1607
+ "name": "s",
1608
+ "type": "string"
1609
+ }
1610
+ ],
1611
+ "returnType": "mixed"
1612
+ },
1613
+ "hash_value": {
1614
+ "signature": "function(mixed : int)",
1615
+ "markdown": "Return a hash value for the argument. It's an integer in the\n native integer range.\n\nThe hash will be the same for the same value in the running\n process only (the memory address is typically used as the basis\n for the hash value).\n\nIf the value is an object with an `__hash`, that function\n is called and its result returned.",
1616
+ "params": [
1617
+ {
1618
+ "name": "value",
1619
+ "type": "mixed"
1620
+ }
1621
+ ],
1622
+ "returnType": "int"
1623
+ },
1624
+ "indices": {
1625
+ "signature": "scope(0,function(array : array(int(0..2147483647))) | function(mapping((1=mixed):mixed) | multiset((1=mixed)) | string(..) : array(1)) | function(object | program : array(string)))",
1626
+ "markdown": "Return an array of all valid indices for the value `x`.\n\nFor strings and arrays this is simply an array of ascending\n numbers.\n\nFor mappings and multisets, the array might contain any value.\n\nFor objects which define `_indices` that return value\n is used.\n\nFor other objects an array with all non-protected symbols is\n returned.",
1627
+ "params": [
1628
+ {
1629
+ "name": "x",
1630
+ "type": "string | array | mapping | multiset"
1631
+ }
1632
+ ],
1633
+ "returnType": "array"
1634
+ },
1635
+ "intp": {
1636
+ "signature": "function(mixed : int(1bit))",
1637
+ "markdown": "Returns `1` if `arg` is an int, `0` (zero) otherwise.",
1638
+ "params": [
1639
+ {
1640
+ "name": "arg",
1641
+ "type": "mixed"
1642
+ }
1643
+ ],
1644
+ "returnType": "int"
1645
+ },
1646
+ "is_absolute_path": {
1647
+ "signature": "function(string : int)",
1648
+ "markdown": "Check if a path `p` is fully qualified (ie not relative).",
1649
+ "params": [
1650
+ {
1651
+ "name": "p",
1652
+ "type": "string"
1653
+ }
1654
+ ],
1655
+ "returnType": "int"
1656
+ },
1657
+ "kill": {
1658
+ "signature": "function(int | object, int : int(1bit))",
1659
+ "markdown": "Send a signal to another process.\n\nSome signals and their supposed purpose:",
1660
+ "params": [
1661
+ {
1662
+ "name": "pid",
1663
+ "type": "int"
1664
+ },
1665
+ {
1666
+ "name": "signal",
1667
+ "type": "int"
1668
+ }
1669
+ ],
1670
+ "returnType": "int"
1671
+ },
1672
+ "limit": {
1673
+ "signature": "scope(0,function((0=int | float | object), (1=int | float | object), (2=int | float | object) : 0 | 1 | 2))",
1674
+ "markdown": "Limits the value `x` so that it's between `minval` and `maxval`.\n If `x` is an object, it must implement the ``<` method.",
1675
+ "params": [
1676
+ {
1677
+ "name": "minval",
1678
+ "type": "int | float | object"
1679
+ },
1680
+ {
1681
+ "name": "x",
1682
+ "type": "int | float | object"
1683
+ },
1684
+ {
1685
+ "name": "maxval",
1686
+ "type": "int | float | object"
1687
+ }
1688
+ ],
1689
+ "returnType": "int | float | object"
1690
+ },
1691
+ "listxattr": {
1692
+ "signature": "function(string, void | int : array(string))",
1693
+ "markdown": "Return an array of all extended attributes set on the file",
1694
+ "params": [
1695
+ {
1696
+ "name": "file",
1697
+ "type": "string"
1698
+ },
1699
+ {
1700
+ "name": "symlink",
1701
+ "type": "mixed"
1702
+ }
1703
+ ],
1704
+ "returnType": "array"
1705
+ },
1706
+ "load_module": {
1707
+ "signature": "function(string : program)",
1708
+ "markdown": "Load a binary module.\n\nThis function loads a module written in C or some other language\n into Pike. The module is initialized and any programs or constants\n defined will immediately be available.\n\nWhen a module is loaded the C function `pike_module_init()` will\n be called to initialize it. When Pike exits `pike_module_exit()`\n will be called. These two functions **must** be available in the module.",
1709
+ "params": [
1710
+ {
1711
+ "name": "module_name",
1712
+ "type": "string"
1713
+ }
1714
+ ],
1715
+ "returnType": "program"
1716
+ },
1717
+ "localtime": {
1718
+ "signature": "function(int : mapping(string:int))",
1719
+ "markdown": "Convert seconds since 00:00:00 UTC, 1 Jan 1970 into components.",
1720
+ "params": [
1721
+ {
1722
+ "name": "timestamp",
1723
+ "type": "int"
1724
+ }
1725
+ ],
1726
+ "returnType": "mapping"
1727
+ },
1728
+ "log": {
1729
+ "signature": "function(int | float : float)",
1730
+ "markdown": "Return the natural logarithm of `f`.\n `exp( log(x) ) == x` for x > 0.",
1731
+ "params": [
1732
+ {
1733
+ "name": "f",
1734
+ "type": "int | float"
1735
+ }
1736
+ ],
1737
+ "returnType": "float"
1738
+ },
1739
+ "lower_case": {
1740
+ "signature": "scope(0,function(int : int) | function(string : string))",
1741
+ "markdown": "Convert a string or character to lower case.",
1742
+ "params": [
1743
+ {
1744
+ "name": "s",
1745
+ "type": "string"
1746
+ }
1747
+ ],
1748
+ "returnType": "string"
1749
+ },
1750
+ "m_delete": {
1751
+ "signature": "scope(0,function(object, mixed : mixed) | function(mapping((0=mixed):(1=mixed)), 0 : 1))",
1752
+ "markdown": "If `map` is an object that implements `_m_delete`,\n that function will be called with `index` as its single argument.\n\nOtherwise if `map` is a mapping the entry with index `index`\n will be removed from `map` destructively.\n\nIf the mapping does not have an entry with index `index`, nothing is done.",
1753
+ "params": [
1754
+ {
1755
+ "name": "map",
1756
+ "type": "object | mapping"
1757
+ },
1758
+ {
1759
+ "name": "index",
1760
+ "type": "mixed"
1761
+ }
1762
+ ],
1763
+ "returnType": "mixed"
1764
+ },
1765
+ "map": {
1766
+ "signature": "scope(0,function(object, mixed ... : mixed) | function(array((1=mixed)), function(1, (0=mixed & zero) ... : (2=void | mixed)), 0 ... : array(2)) | function(array((1=mixed)), multiset, mixed ... : array(int(1bit))) | function(array((1=mixed)), mapping(mixed:(2=mixed)), mixed ... : array(2 | zero)) | function(array((1=mixed)), array, mixed ... : array(array)) | function(array((1=mixed)) : array) | function(mapping((3=mixed):(1=mixed)), function(1, (0=mixed & zero) ... : (2=void | mixed)), 0 ... : mapping(3:2)) | function(mapping((3=mixed):(1=mixed)), multiset, mixed ... : mapping(3:int(1bit))) | function(mapping((3=mixed):(1=mixed)), mapping(mixed:(2=mixed)), mixed ... : mapping(3:2 | zero)) | function(mapping((3=mixed):(1=mixed)), array, mixed ... : mapping(3:array)) | function(mapping((3=mixed):(1=mixed)) : mapping(3:mixed)) | function(multiset((1=mixed)), function(1, (0=mixed & zero) ... : (2=void | mixed)), 0 ... : multiset(2)) | function(multiset((1=mixed)), multiset, mixed ... : multiset(int(1bit))) | function(multiset((1=mixed)), mapping(mixed:(2=mixed)), mixed ... : multiset(2 | zero)) | function(multiset((1=mixed)), array, mixed ... : multiset(array)) | function(multiset((1=mixed)) : multiset) | function(!array & (function | program), function(mixed, (0=mixed & zero) ... : (2=void | mixed)), 0 ... : mapping(string:2)) | function(!array & (function | program), multiset, mixed ... : mapping(string:int(1bit))) | function(!array & (function | program), mapping(mixed:(2=mixed)), mixed ... : mapping(string:2 | zero)) | function(!array & (function | program), array, mixed ... : mapping(string:array)) | function(!array & (function | program) : mapping(string:mixed)) | function(string, function(int, mixed ... : int), mixed ... : string) | function(string, multiset, mixed ... : string) | function(string, mapping(mixed:int), mixed ... : string) | function(array(function | mapping | multiset | object | program), string, mixed ... : array) | function(mapping((3=mixed):function | mapping | multiset | object | program), string, mixed ... : mapping(3:mixed)) | function(multiset(function | mapping | multiset | object | program), string, mixed ... : multiset) | function(function | program, string, mixed ... : mapping) | !function(array((1=mixed)), !mixed ... : mixed) & function(array((1=mixed)), mixed ... : array) | !function(mapping((3=mixed):(1=mixed)), !mixed ... : mixed) & function(mapping((3=mixed):(1=mixed)), mixed ... : mapping(3:mixed)) | !function(multiset((1=mixed)), !mixed ... : mixed) & function(multiset((1=mixed)), mixed ... : multiset) | !function(!array & (function | program), !mixed ... : mixed) & function(!array & (function | program), mixed ... : mapping(string:mixed)))",
1767
+ "markdown": "Applies `fun` to the elements in `arr` and collects the results.\n\n`arr` is treated as a set of elements, as follows:\n\n`fun` is applied in different ways depending on its type:",
1768
+ "params": [
1769
+ {
1770
+ "name": "arr",
1771
+ "type": "mixed"
1772
+ },
1773
+ {
1774
+ "name": "fun",
1775
+ "type": "mixed"
1776
+ },
1777
+ {
1778
+ "name": "extra",
1779
+ "type": "mixed"
1780
+ }
1781
+ ],
1782
+ "returnType": "mixed"
1783
+ },
1784
+ "mappingp": {
1785
+ "signature": "function(mixed : int(1bit))",
1786
+ "markdown": "Returns `1` if `arg` is a mapping, `0` (zero) otherwise.",
1787
+ "params": [
1788
+ {
1789
+ "name": "arg",
1790
+ "type": "mixed"
1791
+ }
1792
+ ],
1793
+ "returnType": "int"
1794
+ },
1795
+ "master": {
1796
+ "signature": "function( : object)",
1797
+ "markdown": "Return the current master object.",
1798
+ "returnType": "object"
1799
+ },
1800
+ "max": {
1801
+ "signature": "scope(0,function(void : zero) | !function(!string ... : mixed) & function(string, string ... : string) | !function(!(int | float) ... : mixed) & function((0=int | float), (1=int | float) ... : 0 | 1) | !function(!(object | mixed) ... : mixed) & function(mixed, mixed ... : mixed))",
1802
+ "markdown": "Returns the largest value among `args`. Compared objects\n must implement the ``<` method.",
1803
+ "params": [
1804
+ {
1805
+ "name": "args",
1806
+ "type": "mixed"
1807
+ }
1808
+ ],
1809
+ "returnType": "int | float | object"
1810
+ },
1811
+ "min": {
1812
+ "signature": "scope(0,function(void : zero) | !function(!string ... : mixed) & function(string, string ... : string) | !function(!(int | float) ... : mixed) & function((0=int | float), (1=int | float) ... : 0 | 1) | !function(!(object | mixed) ... : mixed) & function(mixed, mixed ... : mixed))",
1813
+ "markdown": "Returns the smallest value among `args`. Compared objects\n must implement the ``<` method.",
1814
+ "params": [
1815
+ {
1816
+ "name": "args",
1817
+ "type": "mixed"
1818
+ }
1819
+ ],
1820
+ "returnType": "int | float | object"
1821
+ },
1822
+ "mkdir": {
1823
+ "signature": "function(string, void | int : int)",
1824
+ "markdown": "Create a directory.\n\nIf `mode` is specified, it's will be used for the new directory after\n being `&`'ed with the current umask (on OS'es that support this).",
1825
+ "params": [
1826
+ {
1827
+ "name": "dirname",
1828
+ "type": "string"
1829
+ },
1830
+ {
1831
+ "name": "mode",
1832
+ "type": "int"
1833
+ }
1834
+ ],
1835
+ "returnType": "int"
1836
+ },
1837
+ "mkmapping": {
1838
+ "signature": "scope(0,function(array((1=mixed)), array((2=mixed)) : mapping(1:2)))",
1839
+ "markdown": "Make a mapping from two arrays.\n\nMakes a mapping `ind`:`val`, `0 <= x < sizeof(ind)`.\n\n`ind` and `val` must have the same size.\n\nThis is the inverse operation of `indices` and `values`.",
1840
+ "params": [
1841
+ {
1842
+ "name": "ind",
1843
+ "type": "array"
1844
+ },
1845
+ {
1846
+ "name": "val",
1847
+ "type": "array"
1848
+ }
1849
+ ],
1850
+ "returnType": "mapping"
1851
+ },
1852
+ "mkmultiset": {
1853
+ "signature": "scope(0,function(array((1=mixed)) : multiset(1)))",
1854
+ "markdown": "This function creates a multiset from an array.",
1855
+ "params": [
1856
+ {
1857
+ "name": "a",
1858
+ "type": "array"
1859
+ }
1860
+ ],
1861
+ "returnType": "multiset"
1862
+ },
1863
+ "mktime": {
1864
+ "signature": "scope(0,function(int, int, int, int, int, int, void | int, void | int : int) | function(mapping | object : int))",
1865
+ "markdown": "This function converts information about date and time into an integer\n which contains the number of seconds since 00:00:00 UTC, Jan 1, 1970.\n\nYou can either call this function with a mapping containing the\n following elements:\n\nOr you can just send them all on one line as the second syntax suggests.",
1866
+ "params": [
1867
+ {
1868
+ "name": "tm",
1869
+ "type": "mapping"
1870
+ }
1871
+ ],
1872
+ "returnType": "int"
1873
+ },
1874
+ "multisetp": {
1875
+ "signature": "function(mixed : int(1bit))",
1876
+ "markdown": "Returns `1` if `arg` is a multiset, `0` (zero) otherwise.",
1877
+ "params": [
1878
+ {
1879
+ "name": "arg",
1880
+ "type": "mixed"
1881
+ }
1882
+ ],
1883
+ "returnType": "int"
1884
+ },
1885
+ "mv": {
1886
+ "signature": "function(string, string : int)",
1887
+ "markdown": "Rename or move a file or directory.\n\nIf the destination already exists, it will be replaced.\n Replacement often only works if `to` is of the same type as\n `from`, i.e. a file can only be replaced by another file and so\n on. Also, a directory will commonly be replaced only if it's\n empty.\n\nOn some OSs this function can't move directories, only rename\n them.",
1888
+ "params": [
1889
+ {
1890
+ "name": "from",
1891
+ "type": "string"
1892
+ },
1893
+ {
1894
+ "name": "to",
1895
+ "type": "string"
1896
+ }
1897
+ ],
1898
+ "returnType": "int"
1899
+ },
1900
+ "next_object": {
1901
+ "signature": "function(void | object : object)",
1902
+ "markdown": "Returns the next object from the list of all objects.\n\nAll objects are stored in a linked list.",
1903
+ "params": [
1904
+ {
1905
+ "name": "o",
1906
+ "type": "object"
1907
+ }
1908
+ ],
1909
+ "returnType": "object"
1910
+ },
1911
+ "normalize_path": {
1912
+ "signature": "function(string : string)",
1913
+ "markdown": "Replaces \"\\\" with \"/\" if runing on MS Windows. It is\n adviced to use `normalize_path` instead.",
1914
+ "params": [
1915
+ {
1916
+ "name": "path",
1917
+ "type": "string"
1918
+ }
1919
+ ],
1920
+ "returnType": "string"
1921
+ },
1922
+ "object_program": {
1923
+ "signature": "function(mixed : function | program)",
1924
+ "markdown": "Return the program from which `o` was instantiated. If the\n object was instantiated from a class using parent references\n the generating function will be returned.\n\nIf `o` is not an object or has been destructed `0` (zero)\n will be returned.",
1925
+ "params": [
1926
+ {
1927
+ "name": "o",
1928
+ "type": "mixed"
1929
+ }
1930
+ ],
1931
+ "returnType": "program | function"
1932
+ },
1933
+ "object_variablep": {
1934
+ "signature": "function(object, string : int)",
1935
+ "markdown": "Find out if an object identifier is a variable.",
1936
+ "params": [
1937
+ {
1938
+ "name": "o",
1939
+ "type": "object"
1940
+ },
1941
+ {
1942
+ "name": "var",
1943
+ "type": "string"
1944
+ }
1945
+ ],
1946
+ "returnType": "int"
1947
+ },
1948
+ "objectp": {
1949
+ "signature": "function(mixed : int(1bit))",
1950
+ "markdown": "Returns `1` if `arg` is an object, `0` (zero) otherwise.",
1951
+ "params": [
1952
+ {
1953
+ "name": "arg",
1954
+ "type": "mixed"
1955
+ }
1956
+ ],
1957
+ "returnType": "int"
1958
+ },
1959
+ "pow": {
1960
+ "signature": "scope(0,function(int, int : int) | function(float, float : float) | function(int, float : float) | function(float, int : float) | function(object, int | float | object : mixed))",
1961
+ "markdown": "Return `n` raised to the power of `x`. If both `n`\n and `x` are integers the result will be an integer.\n If `n` is an object its pow method will be called with\n `x` as argument.",
1962
+ "params": [
1963
+ {
1964
+ "name": "n",
1965
+ "type": "float | int"
1966
+ },
1967
+ {
1968
+ "name": "x",
1969
+ "type": "float | int"
1970
+ }
1971
+ ],
1972
+ "returnType": "int | float"
1973
+ },
1974
+ "programp": {
1975
+ "signature": "function(mixed : int(1bit))",
1976
+ "markdown": "Returns `1` if `arg` is a program, `0` (zero) otherwise.",
1977
+ "params": [
1978
+ {
1979
+ "name": "arg",
1980
+ "type": "mixed"
1981
+ }
1982
+ ],
1983
+ "returnType": "int"
1984
+ },
1985
+ "query_num_arg": {
1986
+ "signature": "function( : int)",
1987
+ "markdown": "Returns the number of arguments given when the previous function was\n called.\n\nThis is useful for functions that take a variable number of arguments.",
1988
+ "returnType": "int"
1989
+ },
1990
+ "random": {
1991
+ "signature": "scope(0,function(object : mixed) | function(int : int) | function(float : float) | function(array((0=mixed)) : 0) | function(multiset((1=mixed)) : 1) | function(mapping : array))",
1992
+ "markdown": "Returns a random index-value pair from the mapping.",
1993
+ "params": [
1994
+ {
1995
+ "name": "m",
1996
+ "type": "mapping"
1997
+ }
1998
+ ],
1999
+ "returnType": "array"
2000
+ },
2001
+ "random_seed": {
2002
+ "signature": "function(int : void)",
2003
+ "markdown": "This function sets the initial value for the random generator.",
2004
+ "params": [
2005
+ {
2006
+ "name": "seed",
2007
+ "type": "int"
2008
+ }
2009
+ ]
2010
+ },
2011
+ "random_string": {
2012
+ "signature": "function(int : string(8bit))",
2013
+ "markdown": "Returns a string of random characters 0-255 with the length `len`.",
2014
+ "params": [
2015
+ {
2016
+ "name": "len",
2017
+ "type": "int"
2018
+ }
2019
+ ],
2020
+ "returnType": "string"
2021
+ },
2022
+ "removexattr": {
2023
+ "signature": "function(string, string, void | int : int)",
2024
+ "markdown": "Remove the specified extended attribute.",
2025
+ "params": [
2026
+ {
2027
+ "name": "file",
2028
+ "type": "string"
2029
+ },
2030
+ {
2031
+ "name": "attr",
2032
+ "type": "string"
2033
+ },
2034
+ {
2035
+ "name": "symlink",
2036
+ "type": "mixed"
2037
+ }
2038
+ ]
2039
+ },
2040
+ "replace": {
2041
+ "signature": "scope(0,function(string, string, string : string) | function(string, array(string), array(string) | string : string) | function(string, mapping(string:string) : string) | function((0=array), mixed, mixed : 0) | function((1=mapping), mixed, mixed : 1))",
2042
+ "markdown": "Generic replace function.\n\nThis function can do several kinds replacement operations, the\n different syntaxes do different things as follows:\n\nIf all the arguments are strings, a copy of `s` with every\n occurrence of `from` replaced with `to` will be returned.\n Special case: `to` will be inserted between every character in\n `s` if `from` is the empty string.\n\nIf the first argument is a string, and the others array(string), a string\n with every occurrance of `from`[*i*] in `s` replaced with\n `to`[*i*] will be returned. Instead of the arrays `from` and `to`\n a mapping equivalent to `` can be\n used.\n\nIf the first argument is an array or mapping, the values of `a` which\n are ``==` with `from` will be replaced with `to` destructively.\n `a` will then be returned.",
2043
+ "params": [
2044
+ {
2045
+ "name": "s",
2046
+ "type": "string"
2047
+ },
2048
+ {
2049
+ "name": "from",
2050
+ "type": "string"
2051
+ },
2052
+ {
2053
+ "name": "to",
2054
+ "type": "string"
2055
+ }
2056
+ ],
2057
+ "returnType": "string"
2058
+ },
2059
+ "replace_master": {
2060
+ "signature": "function(object : void)",
2061
+ "markdown": "Replace the master object with `o`.\n\nThis will let you control many aspects of how Pike works, but beware that\n `master.pike` may be required to fill certain functions, so it is\n usually a good idea to have your master inherit the original master and\n only re-define certain functions.\n\nFIXME: Tell how to inherit the master.",
2062
+ "params": [
2063
+ {
2064
+ "name": "o",
2065
+ "type": "object"
2066
+ }
2067
+ ]
2068
+ },
2069
+ "reverse": {
2070
+ "signature": "scope(0,function(int, void | int, void | int : int) | function(string, void | int, void | int : string) | function((0=array), void | int, void | int : 0))",
2071
+ "markdown": "Reverses a string, array or int.",
2072
+ "params": [
2073
+ {
2074
+ "name": "s",
2075
+ "type": "string"
2076
+ },
2077
+ {
2078
+ "name": "start",
2079
+ "type": "int"
2080
+ },
2081
+ {
2082
+ "name": "end",
2083
+ "type": "int"
2084
+ }
2085
+ ],
2086
+ "returnType": "string"
2087
+ },
2088
+ "rm": {
2089
+ "signature": "function(string : int)",
2090
+ "markdown": "Remove a file or directory.",
2091
+ "params": [
2092
+ {
2093
+ "name": "f",
2094
+ "type": "string"
2095
+ }
2096
+ ],
2097
+ "returnType": "int"
2098
+ },
2099
+ "round": {
2100
+ "signature": "function(int | float : float)",
2101
+ "markdown": "Return the closest integer value to `f`.",
2102
+ "params": [
2103
+ {
2104
+ "name": "f",
2105
+ "type": "int | float"
2106
+ }
2107
+ ],
2108
+ "returnType": "float"
2109
+ },
2110
+ "rows": {
2111
+ "signature": "scope(0,function(mapping((0=mixed):(1=mixed)), array(0) : array(1)) | function(multiset((0=mixed)), array(0) : array(int(1bit))) | function(string, array(int) : array(int)) | function(array((0=mixed)), array(int) : array(1)) | function(array, array(!int) : array) | function(function | int | object | program, array : array))",
2112
+ "markdown": "Select a set of rows from an array.\n\nThis function is en optimized equivalent to:\n\nThat is, it indices data on every index in the array index and\n returns an array with the results.",
2113
+ "params": [
2114
+ {
2115
+ "name": "data",
2116
+ "type": "mixed"
2117
+ },
2118
+ {
2119
+ "name": "index",
2120
+ "type": "array"
2121
+ }
2122
+ ],
2123
+ "returnType": "array"
2124
+ },
2125
+ "search": {
2126
+ "signature": "scope(0,function(string, int | string, void | int : int) | function(array((0=mixed)), 0, void | int : int) | function(mapping((1=mixed):(2=mixed)), 2, 1 | void : 1) | function(object, mixed, void | (3=mixed) : 3))",
2127
+ "markdown": "Search for `needle` in `haystack`.",
2128
+ "params": [
2129
+ {
2130
+ "name": "haystack",
2131
+ "type": "string"
2132
+ },
2133
+ {
2134
+ "name": "needle",
2135
+ "type": "string | int"
2136
+ },
2137
+ {
2138
+ "name": "start",
2139
+ "type": "int"
2140
+ }
2141
+ ],
2142
+ "returnType": "int"
2143
+ },
2144
+ "set_priority": {
2145
+ "signature": "function(string, void | int : int)",
2146
+ "markdown": "",
2147
+ "params": [
2148
+ {
2149
+ "name": "level",
2150
+ "type": "string"
2151
+ },
2152
+ {
2153
+ "name": "pid",
2154
+ "type": "mixed"
2155
+ }
2156
+ ],
2157
+ "returnType": "int"
2158
+ },
2159
+ "set_weak_flag": {
2160
+ "signature": "scope(0,function((1=mixed), int : 1))",
2161
+ "markdown": "Set the value `m` to use weak or normal references in its\n indices and/or values (whatever is applicable). `state` is a\n bitfield built by using `|` between the following flags:\n\nIf a flag is absent, the corresponding field will use normal\n references. `state` can also be `1` as a compatibility\n measure; it's treated like `WEAK`.",
2162
+ "params": [
2163
+ {
2164
+ "name": "m",
2165
+ "type": "array | mapping | multiset"
2166
+ },
2167
+ {
2168
+ "name": "state",
2169
+ "type": "int"
2170
+ }
2171
+ ],
2172
+ "returnType": "array | mapping | multiset"
2173
+ },
2174
+ "setxattr": {
2175
+ "signature": "function(string, string, string, int, void | int : int)",
2176
+ "markdown": "Set the attribute `attr` to the value `value`.\n\nThe flags parameter can be used to refine the semantics of the operation.\n\n`XATTR_CREATE` specifies a pure create, which\n fails if the named attribute exists already.\n\n`XATTR_REPLACE` specifies a pure replace operation, which\n fails if the named attribute does not already exist.\n\nBy default (no flags), the extended attribute will be created if need be, \n or will simply replace the value if the attribute exists.",
2177
+ "params": [
2178
+ {
2179
+ "name": "file",
2180
+ "type": "string"
2181
+ },
2182
+ {
2183
+ "name": "attr",
2184
+ "type": "string"
2185
+ },
2186
+ {
2187
+ "name": "value",
2188
+ "type": "string"
2189
+ },
2190
+ {
2191
+ "name": "flags",
2192
+ "type": "int"
2193
+ },
2194
+ {
2195
+ "name": "symlink",
2196
+ "type": "mixed"
2197
+ }
2198
+ ]
2199
+ },
2200
+ "sgn": {
2201
+ "signature": "function(mixed, void | mixed : int(-1..1))",
2202
+ "markdown": "Check the sign of a value.",
2203
+ "params": [
2204
+ {
2205
+ "name": "value",
2206
+ "type": "mixed"
2207
+ }
2208
+ ],
2209
+ "returnType": "int"
2210
+ },
2211
+ "signal": {
2212
+ "signature": "function(int, void | function(void | int : void) : mixed)",
2213
+ "markdown": "Trap signals.\n\nThis function allows you to trap a signal and have a function called\n when the process receives a signal. Although it IS possible to trap\n SIGBUS, SIGSEGV etc, I advise you not to; Pike should not receive any\n such signals, and if it does, it is because of bugs in the Pike\n interpreter. And all bugs should be reported, no matter how trifle.\n\nThe callback will receive the signal number as its only argument.\n\nSee the documentation for `kill` for a list of signals.\n\nIf no second argument is given, the signal handler for that signal\n is restored to the default handler.\n\nIf the second argument is zero, the signal will be completely ignored.",
2214
+ "params": [
2215
+ {
2216
+ "name": "sig",
2217
+ "type": "int"
2218
+ },
2219
+ {
2220
+ "name": "callback",
2221
+ "type": "function"
2222
+ }
2223
+ ],
2224
+ "returnType": "function"
2225
+ },
2226
+ "signame": {
2227
+ "signature": "function(int : string)",
2228
+ "markdown": "Returns a string describing the signal `sig`.",
2229
+ "params": [
2230
+ {
2231
+ "name": "sig",
2232
+ "type": "int"
2233
+ }
2234
+ ],
2235
+ "returnType": "string"
2236
+ },
2237
+ "signum": {
2238
+ "signature": "function(string : int)",
2239
+ "markdown": "Get a signal number given a descriptive string.\n\nThis function is the inverse of `signame`.",
2240
+ "params": [
2241
+ {
2242
+ "name": "sig",
2243
+ "type": "string"
2244
+ }
2245
+ ],
2246
+ "returnType": "int"
2247
+ },
2248
+ "sin": {
2249
+ "signature": "function(int | float : float)",
2250
+ "markdown": "Returns the sine value for `f`.\n `f` should be specified in radians.",
2251
+ "params": [
2252
+ {
2253
+ "name": "f",
2254
+ "type": "int | float"
2255
+ }
2256
+ ],
2257
+ "returnType": "float"
2258
+ },
2259
+ "sinh": {
2260
+ "signature": "function(int | float : float)",
2261
+ "markdown": "Returns the hyperbolic sine value for `f`.",
2262
+ "params": [
2263
+ {
2264
+ "name": "f",
2265
+ "type": "int | float"
2266
+ }
2267
+ ],
2268
+ "returnType": "float"
2269
+ },
2270
+ "sizeof": {
2271
+ "signature": "function(array | mapping | multiset | object | string : int(0..2147483647))",
2272
+ "markdown": "Size query.",
2273
+ "params": [
2274
+ {
2275
+ "name": "arg",
2276
+ "type": "string"
2277
+ }
2278
+ ],
2279
+ "returnType": "int"
2280
+ },
2281
+ "sleep": {
2282
+ "signature": "function(int | float, void | int : void)",
2283
+ "markdown": "This function makes the program stop for `s` seconds.\n\nOnly signal handlers can interrupt the sleep, and only when\n `abort_on_signal` is set. If more than one thread is running\n the signal must be sent to the sleeping thread. Other callbacks\n are not called during sleep.\n\nIf `s` is zero then this thread will yield to other threads but\n not sleep otherwise. Note that Pike yields internally at regular\n intervals so it's normally not necessary to do this.",
2284
+ "params": [
2285
+ {
2286
+ "name": "s",
2287
+ "type": "int | float"
2288
+ },
2289
+ {
2290
+ "name": "abort_on_signal",
2291
+ "type": "int"
2292
+ }
2293
+ ]
2294
+ },
2295
+ "sort": {
2296
+ "signature": "scope(0,function(array((0=mixed)), array ... : array(0)))",
2297
+ "markdown": "Sort arrays destructively.\n\nThis function sorts the array `index` destructively. That means\n that the array itself is changed and returned, no copy is created.\n\nIf extra arguments are given, they are supposed to be arrays of the\n same size as `index`. Each of these arrays will be modified in the\n same way as `index`. I.e. if index 3 is moved to position 0 in `index`\n index 3 will be moved to position 0 in all the other arrays as well.\n\nThe sort order is as follows:",
2298
+ "params": [
2299
+ {
2300
+ "name": "index",
2301
+ "type": "array"
2302
+ },
2303
+ {
2304
+ "name": "data",
2305
+ "type": "mixed"
2306
+ }
2307
+ ],
2308
+ "returnType": "array"
2309
+ },
2310
+ "sprintf": {
2311
+ "signature": "function(__attribute__(\"strict_sprintf_format\", object | string), __attribute__(\"sprintf_args\", mixed) ... : __attribute__(\"sprintf_result\", string))",
2312
+ "markdown": "Print formated output to string.\n\nThe `format` string is a string containing a description of how to\n output the data in `args`. This string should generally speaking\n have one `%` format specifier\n (examples: `%s`, `%0d`, `%-=20s`) for each of the arguments.\n\nThe following modifiers are supported:\n\nThe following operators are supported:\n\nMost modifiers and operators are combinable in any fashion, but some\n combinations may render strange results.\n\nIf an argument is an object that implements `_sprintf`, that\n callback will be called with the operator as the first argument, and\n the current modifiers as the second. The callback is expected to return\n a string.",
2313
+ "params": [
2314
+ {
2315
+ "name": "format",
2316
+ "type": "object"
2317
+ },
2318
+ {
2319
+ "name": "args",
2320
+ "type": "mixed"
2321
+ }
2322
+ ],
2323
+ "returnType": "string"
2324
+ },
2325
+ "sqrt": {
2326
+ "signature": "scope(0,function(object : mixed) | function(int : int) | function(float : float))",
2327
+ "markdown": "Returns the square root of `f`, or in the integer case, the square root\n truncated to the closest lower integer. If the argument is an object,\n the lfun _sqrt in the object will be called.",
2328
+ "params": [
2329
+ {
2330
+ "name": "f",
2331
+ "type": "float"
2332
+ }
2333
+ ],
2334
+ "returnType": "float"
2335
+ },
2336
+ "strerror": {
2337
+ "signature": "function(int : string)",
2338
+ "markdown": "This function returns a description of an error code. The error\n code is usually obtained from eg `errno`.",
2339
+ "params": [
2340
+ {
2341
+ "name": "errno",
2342
+ "type": "int"
2343
+ }
2344
+ ],
2345
+ "returnType": "string"
2346
+ },
2347
+ "string_filter_non_unicode": {
2348
+ "signature": "function(string, void | int : string(8bit))",
2349
+ "markdown": "Replace the most obviously non-unicode characters from `s` with\n the unicode replacement character.",
2350
+ "params": [
2351
+ {
2352
+ "name": "s",
2353
+ "type": "string"
2354
+ }
2355
+ ],
2356
+ "returnType": "string"
2357
+ },
2358
+ "string_to_unicode": {
2359
+ "signature": "function(string, void | int(0..2) : string(8bit))",
2360
+ "markdown": "Converts a string into an UTF16 compliant byte-stream.",
2361
+ "params": [
2362
+ {
2363
+ "name": "s",
2364
+ "type": "string"
2365
+ },
2366
+ {
2367
+ "name": "byteorder",
2368
+ "type": "mixed"
2369
+ }
2370
+ ],
2371
+ "returnType": "string"
2372
+ },
2373
+ "string_to_utf8": {
2374
+ "signature": "function(string, void | int : string(8bit))",
2375
+ "markdown": "Convert a string into a UTF-8 compliant byte-stream.",
2376
+ "params": [
2377
+ {
2378
+ "name": "s",
2379
+ "type": "string"
2380
+ }
2381
+ ],
2382
+ "returnType": "string"
2383
+ },
2384
+ "stringp": {
2385
+ "signature": "function(mixed : int(1bit))",
2386
+ "markdown": "Returns `1` if `arg` is a string, `0` (zero) otherwise.",
2387
+ "params": [
2388
+ {
2389
+ "name": "arg",
2390
+ "type": "mixed"
2391
+ }
2392
+ ],
2393
+ "returnType": "int"
2394
+ },
2395
+ "strlen": {
2396
+ "signature": "function(string : int(0..2147483647))",
2397
+ "markdown": "Alias for `sizeof`.",
2398
+ "params": [
2399
+ {
2400
+ "name": "thing",
2401
+ "type": "string | multiset | array | mapping"
2402
+ }
2403
+ ],
2404
+ "returnType": "int"
2405
+ },
2406
+ "tan": {
2407
+ "signature": "function(int | float : float)",
2408
+ "markdown": "Returns the tangent value for `f`.\n `f` should be specified in radians.",
2409
+ "params": [
2410
+ {
2411
+ "name": "f",
2412
+ "type": "int | float"
2413
+ }
2414
+ ],
2415
+ "returnType": "float"
2416
+ },
2417
+ "tanh": {
2418
+ "signature": "function(int | float : float)",
2419
+ "markdown": "Returns the hyperbolic tangent value for `f`.",
2420
+ "params": [
2421
+ {
2422
+ "name": "f",
2423
+ "type": "int | float"
2424
+ }
2425
+ ],
2426
+ "returnType": "float"
2427
+ },
2428
+ "this_object": {
2429
+ "signature": "function(void | int(0..2147483647) : object)",
2430
+ "markdown": "Returns the object we are currently evaluating in.\n\n`level` might be used to access the object of a surrounding\n class: The object at level 0 is the current object, the object\n at level 1 is the one belonging to the class that surrounds\n the class that the object comes from, and so on.",
2431
+ "params": [
2432
+ {
2433
+ "name": "level",
2434
+ "type": "int"
2435
+ }
2436
+ ],
2437
+ "returnType": "object"
2438
+ },
2439
+ "throw": {
2440
+ "signature": "function(mixed : void | mixed)",
2441
+ "markdown": "Throw `value` to a waiting `catch`.\n\nIf no `catch` is waiting the global error handling will send the\n value to `master()->handle_error()`.\n\nIf you throw an array with where the first index contains an error\n message and the second index is a backtrace, (the output from\n `backtrace`) then it will be treated exactly like a real error\n by overlying functions.",
2442
+ "params": [
2443
+ {
2444
+ "name": "value",
2445
+ "type": "mixed"
2446
+ }
2447
+ ],
2448
+ "returnType": "mixed"
2449
+ },
2450
+ "time": {
2451
+ "signature": "scope(0,function(void | int(1bit) : int(2..2147483647)) | function(int(2..2147483647) : float))",
2452
+ "markdown": "This function returns the number of seconds since 00:00:00 UTC, 1 Jan 1970.\n\nThe second syntax does not query the system for the current\n time, instead the last time value used by the pike process is returned\n again. It avoids a system call, and thus is slightly faster,\n but can be wildly inaccurate. Pike\n queries the time internally when a thread has waited for\n something, typically in `sleep` or in a backend (see\n `Backend`).\n\nThe third syntax can be used to measure time more precisely than one\n second. It returns how many seconds have passed since `t`. The precision\n of this function varies from system to system.",
2453
+ "returnType": "int"
2454
+ },
2455
+ "trace": {
2456
+ "signature": "function(int, void | string, void | int : int)",
2457
+ "markdown": "This function changes the trace level for the subsystem identified\n by `facility` to `level`. If `facility` is zero or left out, it\n changes the global trace level which affects all subsystems.\n\nEnabling tracing causes messages to be printed to stderr. A higher\n trace level includes the output from all lower levels. The lowest\n level is zero which disables all trace messages.\n\nSee the `-t` command-line option for more information.",
2458
+ "params": [
2459
+ {
2460
+ "name": "level",
2461
+ "type": "int"
2462
+ },
2463
+ {
2464
+ "name": "facility",
2465
+ "type": "string"
2466
+ },
2467
+ {
2468
+ "name": "all_threads",
2469
+ "type": "int"
2470
+ }
2471
+ ],
2472
+ "returnType": "int"
2473
+ },
2474
+ "types": {
2475
+ "signature": "scope(0,function(array((0=mixed)) | mapping(mixed:(0=mixed)) | string(..) : array(type(0))) | function(multiset : array(type(int(1..1)))) | function(object | program : array(type(mixed))))",
2476
+ "markdown": "Return an array of all valid indices for the value `x`.\n\nFor strings this is simply an array with `int`\n\nFor arrays, mappings and multisets this is simply\n an array with `mixed`.\n\nFor objects which define `_types` that return value\n is used.\n\nFor other objects an array with type types for all non-protected\n symbols is returned.",
2477
+ "params": [
2478
+ {
2479
+ "name": "x",
2480
+ "type": "string | array | mapping | multiset"
2481
+ }
2482
+ ],
2483
+ "returnType": "array"
2484
+ },
2485
+ "ualarm": {
2486
+ "signature": "function(int : int)",
2487
+ "markdown": "Set an alarm clock for delivery of a signal.\n\n`alarm` arranges for a SIGALRM signal to be delivered to the\n process in `useconds` microseconds.\n\nIf `useconds` is `0` (zero), no new alarm will be scheduled.\n\nAny previous alarms will in any case be canceled.",
2488
+ "params": [
2489
+ {
2490
+ "name": "useconds",
2491
+ "type": "int"
2492
+ }
2493
+ ],
2494
+ "returnType": "int"
2495
+ },
2496
+ "undefinedp": {
2497
+ "signature": "function(mixed : int(1bit))",
2498
+ "markdown": "Returns `1` if `arg` is undefined, `0` (zero) otherwise.",
2499
+ "params": [
2500
+ {
2501
+ "name": "arg",
2502
+ "type": "mixed"
2503
+ }
2504
+ ],
2505
+ "returnType": "int"
2506
+ },
2507
+ "unicode_to_string": {
2508
+ "signature": "function(string(8bit), void | int(0..2) : string)",
2509
+ "markdown": "Converts an UTF16 byte-stream into a string.",
2510
+ "params": [
2511
+ {
2512
+ "name": "s",
2513
+ "type": "string"
2514
+ },
2515
+ {
2516
+ "name": "byteorder",
2517
+ "type": "mixed"
2518
+ }
2519
+ ],
2520
+ "returnType": "string"
2521
+ },
2522
+ "upper_case": {
2523
+ "signature": "scope(0,function(int : int) | function(string : string))",
2524
+ "markdown": "Convert a string or character to upper case.",
2525
+ "params": [
2526
+ {
2527
+ "name": "s",
2528
+ "type": "string"
2529
+ }
2530
+ ],
2531
+ "returnType": "string"
2532
+ },
2533
+ "utf8_to_string": {
2534
+ "signature": "function(string(8bit), void | int : string)",
2535
+ "markdown": "Converts an UTF-8 byte-stream into a string.",
2536
+ "params": [
2537
+ {
2538
+ "name": "s",
2539
+ "type": "string"
2540
+ }
2541
+ ],
2542
+ "returnType": "string"
2543
+ },
2544
+ "values": {
2545
+ "signature": "scope(0,function(multiset | string : array(int)) | function(array((0=mixed)) | mapping(mixed:(0=mixed)) | object | program : array(0)))",
2546
+ "markdown": "Return an array of all possible values from indexing the value\n `x`.\n\nFor strings an array of int with the ISO10646 codes of the\n characters in the string is returned.\n\nFor a multiset an array filled with ones (`1`) is\n returned.\n\nFor arrays a single-level copy of `x` is returned.\n\nFor mappings the array may contain any value.\n\nFor objects which define `_values` that return value\n is used.\n\nFor other objects an array with the values of all non-protected\n symbols is returned.",
2547
+ "params": [
2548
+ {
2549
+ "name": "x",
2550
+ "type": "string | array | mapping | multiset"
2551
+ }
2552
+ ],
2553
+ "returnType": "array"
2554
+ },
2555
+ "version": {
2556
+ "signature": "function( : string)",
2557
+ "markdown": "Report the version of Pike. Does the same as",
2558
+ "returnType": "string"
2559
+ },
2560
+ "werror": {
2561
+ "signature": "scope(0,function(string : int) | function(array(string), mixed ... : int) | function(__attribute__(\"sprintf_format\", string), __attribute__(\"sprintf_args\", mixed) ... : int))",
2562
+ "markdown": "Writes a string on stderr. Works just like `write`\n on `stderr`.",
2563
+ "params": [
2564
+ {
2565
+ "name": "fmt",
2566
+ "type": "string"
2567
+ },
2568
+ {
2569
+ "name": "args",
2570
+ "type": "mixed"
2571
+ }
2572
+ ],
2573
+ "returnType": "int"
2574
+ },
2575
+ "write": {
2576
+ "signature": "scope(0,function(string : int) | function(array(string), mixed ... : int) | function(__attribute__(\"sprintf_format\", string), __attribute__(\"sprintf_args\", mixed) ... : int))",
2577
+ "markdown": "Writes a string on stdout. Works just like `write`\n on `stdout`.",
2578
+ "params": [
2579
+ {
2580
+ "name": "fmt",
2581
+ "type": "string"
2582
+ },
2583
+ {
2584
+ "name": "args",
2585
+ "type": "mixed"
2586
+ }
2587
+ ],
2588
+ "returnType": "int"
2589
+ },
2590
+ "zero_type": {
2591
+ "signature": "function(mixed : int(1bit))",
2592
+ "markdown": "Return the type of zero.\n\nThere are many types of zeros out there, or at least there are two.\n One is returned by normal functions, and one returned by mapping\n lookups and `find_call_out` when what you looked for wasn't there.\n The only way to separate these two kinds of zeros is `zero_type`.",
2593
+ "params": [
2594
+ {
2595
+ "name": "a",
2596
+ "type": "mixed"
2597
+ }
2598
+ ],
2599
+ "returnType": "int"
2600
+ }
2601
+ }