Syntax
- float size(array)
Parameters
- array—(float[], bool[], string[])Array for which size is requested.
Returns
The number of the elements in array.
Related
Example
Number of elements
const a = [1:4]
const b = [1,2 ; 3,4]
Example --> print(size(a)) // 4
print(size(b)) // 4
Components
const edgeLengths = comp(e) { all : scope.sx }
const faceAreas = comp(f) { all : geometry.area() }
Example --> print(edgeLengths) // (4)[2,2,2,2]
print(faceAreas) // (1)[4]
print(size(edgeLengths)) // 4
print(size(faceAreas)) // 1
Example
Number of elements
const a = [1:4]
const b = [1,2 ; 3,4]
Example --> print(size(a)) // 4
print(size(b)) // 4
Components
const edgeLengths = comp(e) { all : scope.sx }
const faceAreas = comp(f) { all : geometry.area() }
Example --> print(edgeLengths) // (4)[2,2,2,2]
print(faceAreas) // (1)[4]
print(size(edgeLengths)) // 4
print(size(faceAreas)) // 1