next up previous contents
Next: READ Up: List of commands in Previous: PRINT-SPECTRUM-HEADER   Contents


PUSH-STACK-UP

This is (a bit) like pushing a paper cup back into one of those dispensers they have on aeroplanes, except that in this analogy the bottom cup would be required miraculously to clone itself. All spectra move up the stack one position, with the one at the top being lost. The current (bottom) spectrum is duplicated into the Y-register. Most useful if you are about to do some destructive in-place piece of reduction (such as FOURIER-POWER-SPECTRUM) and want to hang onto the original spectrum in case you don't like the result.

Examples:

    >> show-stack <CR>
    Number of stack positions in use is  4

              Data stack contents


    Stack posn    Scan no    Title
        X            4      doc                       
        Y            3      grumpy                    
        Z            2      sneezy                    
        T            1      dopey                     

    >> push-stack-up <CR>
    X-register now contains scan    4: doc
    Number of stack positions in use is  4
    ..
    >> show-stack <CR>
    Number of stack positions in use is  4

              Data stack contents


    Stack posn    Scan no    Title
        X            4      doc                       
        Y            4      doc                       
        Z            3      grumpy                    
        T            2      sneezy



Jamie Leech 2004-08-16