PUSH
Name
PUSH
Purpose
Adds an element to the end of a (possibly non-existent) array.
Category
Misc
Calling Sequence
PUSH, Array, Value
Inputs
Array: An array to which the values are to be added. The array
is created if it doesn't already exist.
Value: A value to be added to the end of Array. Must be the
same type as Array.
Example
IDL> PUSH, a, 5
IDL> PRINT, a
5
IDL> PUSH, a, 8
IDL> PRINT, a
5 8
Modification History
Written by: Jeremy Bailin
12 June 2008 Public release in JBIU
ro push, array, value
ase size(array, /n_dimen) of
0: array = [(value)[*]]
1: array = [array, (value)[*]]
else: message, 'Array cannot have more than 1 dimension.'
ndcase
nd