size function

Syntax

  • float size(float[] array)
  • float size(string[] array)
  • float size(bool[] array)

Parameters

  1. array
    Array for which size is requested.

Returns

The size of the array.

Description

The size function returns the number of elements in an array.

Related

Example

Print size

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


In this topic