Go to main content

array

Functions to create and manipulate arrays

ARRAY

NAME

array - all functions for array

SYNOPSIS

array(nbelements)

DESCRIPTION

This function is used to create an array, with a number of elements specified at the beginning. Elements are numbered from 0 to nbelements-1, where nbelements is the argument of this function.

Array can be used with the pop and top functions.

However, when used with some mathematical functions, it will simply consider the array lenght as argument and return the answer related to it. Hence, it is better to verify for each mathematical function before using it with an array.

EXAMPLES

a=[1,2,3,"potatoes"];

To retrieve data from the array :
a[0] return 1
a[1] return 2
a[2] return 3
a[3] return potatoes

 

SEE ALSO

{{ include("includes/array.sn") }}

AUTHOR

Written by Pierre Laplante and Caroline Laplante, <laplante@sednove.com>

MODIFICATIONS

1.0 2014-09-09 21:24:14 laplante@sednove.com

Edit

© 2022 extenso Inc. All rights reserved.