| THE META-HTML LANGUAGE REFERENCE MANUAL

| [TOC] |

## Manual Page Viewer

Name: ARRAY-SHIFT

Section: Arrays

Synopsis:

`<array-shift AMOUNT ARRAYVAR>`

Description:

Shift the elements of ARRAYVAR the indicated amount.

If AMOUNT is negative, the elements are shifted down (i.e. towards zero), with the lowest number elements being lost.

If AMOUNT is positive, the elements are shifted up, with no loss at all -- instead empty elements are used to fill the created space.

Given the array:

    <set-var array[] =
       <prog
           0
           1
           2>>

then after executing `<array-shift 2 array>`, the array looks like:

       ""
       ""
       "0"
       "1"
       "2"

and, a subsequent execution of `<array-shift -3 array>` leaves ARRAY:

       "1"
       "2"

Edit Pointer
Function Index
Variable Index
Variable Editor

The META-HTML Reference Manual V1.4 Copyright © 1995, 1996, Brian J. Fox, 1996, 1997 Universal Access Inc.
Found a bug? Send mail to bug-manual@metahtml.com