How to add your knowledge

length()

    Table of contents
    1. 1. Synopsis
    2. 2. Syntax
    3. 3. Example 1
    4. 4. Example 2
    5. 5. Example 3

    Synopsis

    If argument is a List, returns the length of list. Nested lists, if any, count as a single item. If argument is a String, returns length of a string, in characters. Any other type of argument results in error.

    Syntax

    length ( item As Any ) As Integer
    Argument Type Description
    item Any List or String only; all other types result in an error.

    Example 1

    List length

    Intent >length({ :a, :b, :c, :d, :e})
    --> 5 

    Example 2

    List length with a nested list

    Intent >length({ :a, {:b, :c}, :d, :e})
    --> 4 

    Example 3

    String length

    Intent >length("abcdefghijklmnopqrstuvwxyz") 
    --> 26