length

From DavinciWiki
Jump to: navigation, search


64-bit SafeYes

Description

Determine the number of elements in an object

Arguments and Return Values

Arguments: A davinci object

Return Value: A uint64

Usage

Syntax: length(object)

For regular arrays, it returns the total number of values in the array.

For strings, it returns the number of characters in the string.

For structures, it returns the number of elements in the structure

For text arrays, it returns the number of lines in the array.

Prior to davinci 2.18 it returned an int. It now returns a uint64.

Examples

dv> a
3x3x1 array of float, bsq format [36 bytes]
0.558329        0.100168        0.899324
0.805147        0.930234        0.535199
0.938504        0.0242239       0.597536

dv> length(a)
9

dv> b       
Text Buffer with 5 lines of text
    1: string line 1
    2: string line 2
    3: string line 3
    4: string line 4
    5: string line 5

dv> length(b)
5

DavinciWiki Mini-Nav Bar

Contents


Contact Developers

  • davinci-dev [AT] mars.asu.edu

All other topics

  • See navigation on the left

Related Functions

Recent Core Changes

Modified On: 11-18-2016

Personal tools