Generic objects

(directly go to documentation on : IsGeneric, GenericTypeName, Array'Create, Array'Size, Array'Get, Array'Set, Array'CreateFromList, Array'ToList. )

# 6. Generic objects

Generic objects are objects that are implemented in C++, but can be accessed through the Yacas interpreter.

IsGeneric | check for generic object
GenericTypeName | get type name
Array'Create | create array
Array'Size | get array size
Array'Get | fetch array element
Array'Set | set array element
Array'CreateFromList | convert list to array
Array'ToList | convert array to list

###

IsGeneric -- check for generic object

##### Internal function

##### Calling format:

    IsGeneric(object)

##### Description:

Returns `True` if an object is of a generic object type.

###

GenericTypeName -- get type name

##### Internal function

##### Calling format:

    GenericTypeName(object)

##### Description:

Returns a string representation of the name of a generic object.

EG

    In> GenericTypeName(Array'Create(10,1))
    Out> "Array";

###

Array'Create -- create array

##### Internal function

##### Calling format:

    Array'Create(size,init)

##### Description:

Creates an array with `size` elements, all initialized to the value `init`.

###

Array'Size -- get array size

##### Internal function

##### Calling format:

    Array'Size(array)

##### Description:

Returns the size of an array (number of elements in the array).

###

Array'Get -- fetch array element

##### Internal function

##### Calling format:

    Array'Get(array,index)

##### Description:

Returns the element at position index in the array passed. Arrays are treated as base-one, so `index` set to 1 would return the first element.

Arrays can also be accessed through the `[]` operators. So `array[index]` would return the same as `Array'Get(array, index)`.

###

Array'Set -- set array element

##### Internal function

##### Calling format:

    Array'Set(array,index,element)

##### Description:

Sets the element at position index in the array passed to the value passed in as argument to element. Arrays are treated as base-one, so `index` set to 1 would set first element.

Arrays can also be accessed through the `[]` operators. So `array[index] := element` would do the same as `Array'Set(array, index,element)`.

###

Array'CreateFromList -- convert list to array

##### Internal function

##### Calling format:

    Array'CreateFromList(list)

##### Description:

Creates an array from the contents of the list passed in.

###

Array'ToList -- convert array to list

##### Internal function

##### Calling format:

    Array'ToList(array)

##### Description:

Creates a list from the contents of the array passed in.