-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathdocumentation.yaml
More file actions
70 lines (59 loc) · 1.62 KB
/
documentation.yaml
File metadata and controls
70 lines (59 loc) · 1.62 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
extensionName: array
icon: i-material-symbols-data-array
filesToIncludeInManual:
- USING.md
- primitives
markdownTemplate: |2
# NetLogo Array Extension
{{> BUILDING.md}}
{{> USING.md}}
## Primitives
{{#contents}}{{#prims}}
[`{{name}}`](#{{primitive.extensionName}}{{primitive.name}})
{{/prims}}{{/contents}}
{{#primitives}}
{{> primTemplate}}
{{/primitives}}
{{> LICENSE.md}}
primTemplate: |2
### `{{name}}`
{{{description}}}
primitives:
- arguments:
- type: list
description: Reports a new array containing the same items in the same order as the input list.
name: from-list
returns: array
type: reporter
- arguments:
- type: array
- name: index
type: number
description: Reports the item in the given array with the given index (ranging from zero to the length of the array minus one).
name: item
returns: anything
type: reporter
- arguments:
- type: array
- name: index
type: number
- name: value
type: anything
description: |2
Sets the item in the given array with the given index (ranging from zero to the length of the array minus one) to the given value.
Note that unlike the `replace-item` primitive for lists, a new array is not created.
The given array is actually modified.
name: set
type: command
- arguments:
- type: array
description: Reports the length of the given array, that is, the number of items in the array.
name: length
returns: number
type: reporter
- arguments:
- type: array
description: Reports a new list containing the same items in the same order as the given array.
name: to-list
returns: list
type: reporter