size function

float size(array)

array float[]string[]bool[] Array for which the size is requested.

Returns the number of elements in array.

Related

Examples

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