TABLE OF CONTENTS


::pwtk::input::peek

SYNOPSIS

proc ::pwtk::input::peek {} {

PURPOSE

The "peek" proc for the input data stack. It returns the input data as a list of the following format:

      array1 array1Data array2 array2Data

where arrayData is in the form to be used by "array set" command, e.g.:

      array set array1 $array1Data

SEE ALSO

For more explanation about the input data stack meschanism see ::pwtk::input::push

SOURCE

    variable stack
    variable stackLevel
    
    if { ! [info exists stackLevel] } {
        ::pwtk::error "can't peek, stack not initialized."
    }
    if { $stackLevel < 1 } {
        pwtk::warning "can't peek an empty stack"
    }
    return [lindex $stack end]
}