The prepend command

The prepend command is used to add elements onto the beginning of a list type. For example it is used to add numbers to vectors (increasing the length of the vector by one) as well as adding frames to movies.

set x to vector;
prepend 10 to x;
prepend 12 to x;
print x;

will leave x containing 12 as the first element and 10 as the second.

Syntax

prepend <expression> to <identifier>;

Examples 

set vs to videosource;
prepend (frame of vs) to my_movie;
prepend sin(34.5) to my_vector;

set myList to list;
prepend myVector to myList;
prepend "Hello" to myList;

See Also

append, insert, vector, movie, list

Cross-linked with InterXlink (PERL) 0.8.1 @ 2005-07-18 13:48:51
glaucoma implant