# Command: copy

NEST HelpDesk | Command Index | NEST Quick Reference

Name:

    copy - Copy the top n stack objects

Synopsis:

    ... obj_n ... obj1 n copy -> ... obj_n ... obj1 obj_n ... obj1

Examples:

    1 2 3 4 2 copy
      -> after this execution 1 2 3 4 3 4 lies on the stack (the last two elements
      were copied).

Diagnostics:

    Raises StackUnderflow error if there are less than n+1 objects on
      the stack.

Author:

    docu edited by Sirko Straube

SeeAlso:

- dup
- over
- index

Source:

    /opt/conda/conda-bld/nest_1512421404550/work/nest-2.12.0/sli/slistack.cc

NEST HelpDesk | Command Index | NEST Quick Reference

© 2004 The NEST Initiative