GNU Info

Info Node: (librep.info)Array Functions

(librep.info)Array Functions


Next: Sequence Functions Prev: Strings Up: Sequences
Enter node , (file) or (file)node

Array Functions
---------------

 - Function: arrayp object
     This function returns true if OBJECT is an array.

 - Function: aref array position
     Returns the element of the array (vector or string) ARRAY POSITION
     elements from the first element (i.e. the first element is
     numbered zero).  If no element exists at POSITION in ARRAY, false
     is returned.

          (aref [0 1 2 3] 2)
              => 2
          
          (aref "abcdef" 3)
              => 100                      ;`d'

 - Function: aset array position value
     This function sets the element of the array ARRAY with an index of
     POSITION (counting from zero) to VALUE. An error is signalled if
     element POSITION does not exist. The result of the function is
     VALUE.

          (setq x [0 1 2 3])
              => [0 1 2 3]
          (aset x 2 'foo)
              => foo
          x
              => [0 1 foo 3]


automatically generated by info2www version 1.2.2.9