Gentee Programming Language > Documentation > Libraries Download documentation

Arrays

Variables of the arr type allow you to work with arrays.

  • Operations
  • Methods

    Operations

    Operations defined for the variable of arr type are listed below. The second column contains possible statements where typename is a variable or an expression of the specified type.
     
    OperationSyntaxReturn typeComments
    Variable descriptionarr name[i]
    arr name[i,j,...]
    arr name[i,j,...] of type
    -Array description. If no item type is specified, uint is used.
    []arr[i]
    arr[i,j,...]
    item typeGet item i.
    ** arruintGet the number of items.
    +=arr of str += str
    arr of uint += uint
    arrAdd a string to an array of strings.
    Add a number to a numeric array.
    foreachThe option of using in the foreach operator.

    foreach cur, myarr
    {
       ...
    }

    Methods

    arr.clearClearing an array
    arr.cutReducing an array
    arr.delDeleting items
    arr.expandAdding items
    arr.insertInserts elements
    arr.moveMove an item
    arr.ptrPointer to data
    arr.reserveReserving position
    arr.sortSorting an array
    arr.sortstrSorting strings


     Copyright © 2004-2006 Gentee Inc. All rights reserved.