Skip to main content

Notifications

Announcements

No record found.

Containers

A container variable can contain different types and values of simple and
extended data types, including arrays and other container variables. Classes
cannot be put into containers.
There are many functions that manipulate container variables. The following
functions are available:


Function Description
conPeek Returns the value being held in a specific position in the
container.
conDel Removes a value from a specific position in the container.
conNull Returns an empty container.


conFind Finds the position in the container that a certain value is
being held (if found).
conIns Inserts a value into a specific position in the container.
conPoke Replaces the value being held in a specific position in the
container, with a new value.
conLen Returns the number of elements in the container.

The following examples have a container variable that contains four values,
including three different data types.


container c; // the container is declared
int i, j;
str txt;
c = [10, 20, "test"]; // the container has 3 values set
print conPeek(c, 3); // the third element is printed
[i,j,txt] = c; // other variables are set from the
container


Best Regards
Hossein Karimi  

Comments

*This post is locked for comments