...
Examples
Example 1
Code Block |
---|
|
watchers2 = addElementIfNotExist(watchers, currentUser()); |
Adds currentUser to the watchers array if currentUser is not already present. The routine function returns a new array watchers2, so the initial array will not be modified.
Example 2
Code Block |
---|
|
watchers = addElementIfNotExist(watchers, currentUser()); |
The initial array will be modified as a result of the = operator and NOT of the routine function call.
Note |
---|
- If arrayName is not defined as an array, the routine function returns error.
- If elem is not the same type as declared in the array definition, the routine function returns error.
|
See also
Filter by label (Content by label) |
---|
showLabels | false |
---|
max | 25 |
---|
showSpace | false |
---|
cql | label = "array_routine" and space = currentSpace ( ) |
---|
labels | array_routinesroutine |
---|
|
We've encountered an issue exporting this macro. Please try exporting this page again later.