#!/bin/csh -f #+ # frame -- set or show the frame number # # Purpose: # Without an argument, show the current value of the FRAMENO # keyword, which gives the index number of the next image. # With one numeric argument, reset the value of FRAMENO on the # side to the given value. # # Usage: # frame [n] # # Arguments: # n = index number of next image (integer) # # Output: # # Exit values: # 0 = normal completion # 1 = wrong number of arguments # # Example: # 1) To show the current frame number: # frame # # 2) To make the next image be frame number 10: # frame 10 #- # Modification history: # 2000-Jan-01 GDW Original version # 2002-Jun-06 GDW Adapted for DEIMOS #----------------------------------------------------------------------- set buf = $0 set cmd = $buf:t set usage = "Usage: $cmd [n]" # verify args... if ( $#argv > 1 ) then printf "$usage\n" exit 1 endif # check for set or show... if ($#argv == 0) then show -s deiccd -terse frameno else # make assignment to verify that the arg is numeric... @ n = $1 # reset the keyword value... modify -s deiccd frameno = $n endif