/KUIP

Command Processor commands.

/KUIP/HELP [ item option ]

ITEM C Command or menu name or keyword(s) D=' '
OPTION C Option D='N'

OPTION:

'EDIT' The help text is written to a file and the editor is invoked,
'NOEDIT' The help text is output on the terminal output.
'KEYWORD' give access to all commands associated to that keyword(s).
'E' Same as 'EDIT'.
'N' Same as 'NOEDIT'
'K' Same as 'KEYWORD'

Find help information by command name, menu name or keywords.

If ITEM is a valid command name (and there is only one such command) then full explanation on that command is provided: syntax (as given by the command USAGE), functionality, list of parameters with their attributes. If ITEM also corresponds to other commands associated to it with a "keyword" then a "See also" message, followed by the names of these commands is given.

If ITEM is a menu (or a submenu) a dialogue is guiding the user in traversing the tree command structure for getting full explanation on a specific command from that tree.

If HELP is entered without parameters, the search start from the top level menu and the user is guided in traversing the complete tree command structure.

'HELP -KEYWORD' (or 'HELP -K') followed by one or more keywords causes HELP to give access to all commands associated to that (list of) keyword(s). If the keyword corresponds to a valid command or (sub)menu name all corresponding commands are accessible. This option is especially useful when you do not know the exact name of a valid command or menu and you can only describe it by its functionality (e.g. 'HELP -KEYWORD POSTSCRIPT').

N.B. If ITEM does not correspond to any valid command or menu name then the option `-KEYWORD' is automatically invoked.

'HELP -EDIT' (or just 'CHELP -E') switches to edit mode: instead of writing the help text to the terminal output, it is written into a temporary file and the pager or editor defined by the command HOST_PAGER is invoked. (On Unix workstations the pager can be defined to display the help text asynchrously in a separated window.) 'CHELP -NOEDIT' (or just 'CHELP -N') switches back to standard mode. The startup value is system dependent.

/KUIP/CHELP [ item option ]

ITEM C Command or menu path D=' '
OPTION C View mode D='N'

OPTION:

'EDIT' The help text is written to a file and the editor is invoked,
'E' Same as 'EDIT'.
'NOEDIT' The help text is output on the terminal output.
'N' Same as 'NOEDIT'

Find help information only on valid command name or menu path.

A more general help facility, associated to keywords, is given by the command HELP.

If ITEM is a command its full explanation is given: syntax (as given by the command USAGE), functionality, list of parameters with their attributes (prompt, type, default, range, etc.). If ITEM='/' the help for all commands is given.

If CHELP is entered without parameters or ITEM is a submenu, the dialogue style is switched to 'AN', guiding the user in traversing the tree command structure.

'CHELP -EDIT' (or just 'CHELP -E') switches to edit mode: instead of writing the help text to the terminal output, it is written into a temporary file and the pager or editor defined by the command HOST_PAGER is invoked. (On Unix workstations the pager can be defined to display the help text asynchrously in a separated window.) 'CHELP -NOEDIT' (or just 'CHELP -N') switches back to standard mode. The startup value is system dependent.

/KUIP/USAGE item

ITEM C Command name

Give the syntax of a command. If ITEM='/' the syntax of all commands is given.

/KUIP/MANUAL item [ output option ]

ITEM C Command or menu path
OUTPUT C Output file name D=' '
OPTION C Text formatting system D=' '

OPTION:

'' '' plain text : plain text format
'LATEX' LaTeX format (encapsulated)
'TEX' LaTeX format (without header)

Write on a file the text formatted help of a command. If ITEM is a menu path the help for all commands linked to that menu is written. If ITEM='/' the help for the complete command tree is written. If OUTPUT=' ' the text is written to the terminal.

The output file produced with option LATEX can be processed directly by LaTeX, i.e. it contains a standard header defining the meta commands used for formatting the document body. With option TEX only the document body is written into the output file which can be included by a driver file containing customized definitions of the standard meta commands. Example:

MANUAL / MAN.TEX LATEX

will produce the file MAN.TEX containg the documentation of all available commands in LaTeX format.

/KUIP/EDIT fname

FNAME C File name

Invoke the editor on the file. The command HOST_EDITOR can be used to define the editor.

If FNAME does not contain an extension the default filetype '.KUMAC' is supplied. The search path defined by the command DEFAULTS is used to find an already existing file. If the file does not exist it is created with the given name.

/KUIP/PRINT fname

FNAME C File name

Send a file to the printer. The command HOST_PRINT can be used to define the host command for printing the file depending on it file extension.

/KUIP/PSVIEW fname

FNAME C File name

Invoke the PostScript viewer on the file. The command HOST_PSVIEWER can be used to define the PostScript viewer.

If FNAME does not contain an extension the default filetype '.PS' is supplied.

/KUIP/LAST [ n fname ]

N I N last commands to be saved D=-99 R=-99:
FNAME C File name D=' '

Perform various operations with the history file.

If FNAME is not specified, the current history file is assumed by default (the startup history file name is LAST.KUMAC). To change the history file the command LAST 0 NEW-FNAME must be entered.

If N.EQ.-99 (default case) the default host editor is called to edit the current history file, containing all the commands of the session.

If N.LT.0 the last -N commands are printed on the screen. On MVS this allows to edit and resubmit commands. On workstations this allows to resubmit blocks of commands by mouse-driven cut-and-paste operations.

If N.EQ.0 the history file FNAME is rewound and set as the current one (the command LAST 0 FNAME itself is not recorded).

If N.GT.0 the last N commands of the session are saved in the current history file.

See also the command RECORDING.

/KUIP/MESSAGE [ string ]

STRING C Message string D=' ' Separate

Write a message string on the terminal. A useful command inside a macro. Several message strings can be given in the same command line, each of them separated by one or more spaces (the usual parameter separator); therefore multiple blanks will be dropped and only one will be kept. If multiple blanks should not be dropped, the string must be surrounded by single quotes.

/KUIP/FMESSAGE [ string output ]

STRING C Message string D=' ' Separate
OUTPUT C Output file name D=' '

Write a message string on OUTPUT file name. OUTPUT file is opened in "append" mode (open for writing at end of file, or create for writing). If OUTPUT=' ' the text is written to the terminal. If 'Message string' contains several words separated by one or more spaces the string must be surrounded by single quotes.

/KUIP/SHELL [ cmd ]

CMD C Shell command string D=' '

Execute a command of the host operating system. The command string is passed to the command processor defined by HOST_SHELL. If CMD=' ' the shell is spawned as interactive subprocess. To return from the shell enter 'RETURN' (the full word, not just ) or 'exit' (depending on the operation system).

/KUIP/WAIT [ string sec ]

STRING C Message string D=' '
SEC R Number of seconds D=0 R=0:

Make a pause (e.g. inside a macro). Wait a given number of seconds (if SEC.GT.0) or just until is entered (if SEC.EQ.0). A message string is also written on the terminal before waiting.

/KUIP/IDLE sec [ string ]

SEC I Number of seconds R=0:
STRING C Command string D=' '

Execute a command if program is idle. The command string is executed if there was no keyboard activity during SEC seconds.

/KUIP/EXIT

End of the interactive session.

/KUIP/QUIT

End of the interactive session.

/KUIP/FUNCTIONS

List of all KUIP System Functions.

*** KUIP System Functions ***

The function name (and arguments) is literally replaced, at run-time, by its current value. At present, the following functions are available:

$DATE ....................... Current date in format DD/MM/YY $TIME ....................... Current time in format HH.MM.SS $CPTIME ..................... CP time elapsed since last call (in sec) $RTIME ...................... Real time elapsed since last call (in sec) $VDIM(VNAME,IDIM) ........... Physical length of vector VNAME on dimension IDIM (1..3) $VLEN(VNAME,IDIM) ........... As above, but for the logical length (i.e. stripping trailing zeroes) $NUMVEC ..................... Current number of vectors $VEXIST(VNAME) .............. Index of vector VNAME (1..$NUMVEC or 0 if VNAME does not exist) $SUBSTRING(STRING,IX,NCH) ... STRING(IX:IX+NCH-1) $UPPER(STRING) .............. STRING changed to upper case $LOWER(STRING) .............. STRING changed to lower case $LEN(STRING) ................ Length of STRING $INDEX(STR1,STR2) ........... Position of first occurrence of STR2 in STR1 $WORDS(STRING,SEP) .......... Number of words separated by SEP $WORD(STRING,K,N,SEP) ....... Extract N words starting at word K $QUOTE(STRING) .............. Add quotes around STRING $UNQUOTE(STRING) ............ Remove quotes around STRING $EXEC('macro args') ......... EXITM value of EXEC call $DEFINED('var_name') ........ List of defined macro variables $EVAL(Expression) ........... Result of the Expression computed by KUIP $SIGMA(Expression) .......... Result of the Expression computed by SIGMA $RSIGMA(Expression) .......... As above but a decimal point is added to integer results $FORMAT(number,format) ...... Format a number according to a Fortran format string, e.g. $FORMAT(1.5,F5.2) ==> ' 1.50' $FORMAT(123,I5.5) ==> '00123' $ARGS ....................... Command line at program invocation $KEYNUM ..................... Address of latest clicked key in style GP $KEYVAL ..................... Value of latest clicked key in style GP $LAST ....................... Latest command line executed $ANUM ....................... Number of aliases $ANAM(I) .................... Name of I-th alias $AVAL(I) .................... Value of I-th alias $STYLE ...................... Current style as defined by SET/STYLE $OS ......................... Operating system name, e.g. UNIX or VMS $MACHINE .................... Hardware or Unix brand, e.g. VAX or HPUX $PID ........................ Process ID $IQUEST(I) .................. Value of IQUEST(I) status vector $ENV(var) ................... Value of environment variable $FEXIST(file) ............... 1 if file exists or 0 otherwise $SHELL(cmd,N) ............... N'th line of shell command output (Unix only) $SHELL(cmd,sep) ............. Shell output with newlines replaced by sep $SHELL(cmd) ................. Same as $SHELL(cmd,' ') $CALL('fun(args)') .......... Call a Fortran REAL FUNCTION $ICALL('ifun(args)') ........ Call an INTEGER FUNCTION $LCALL('lfun(args)') ........ Call a LOGICAL FUNCTION and return 0 or 1 $DCALL('dfun(args)') ........ Call a DOUBLE PRECISION FUNCTION $HCDIR() .................... Current Hbook working directory $HEXIST(id) ................. 1 if histogram ID exists or 0 otherwise $HINFO(id,'1DHISTO') ........ 1 if ID is a 1D histogram or 0 otherwise $HINFO(id,'2DHISTO') ........ 1 if ID is a 2D histogram or 0 otherwise $HINFO(id,'TABLE') .......... 1 if ID is a table or 0 otherwise $HINFO(id,'PROFILE') ........ 1 if ID is a profile histogram or 0 otherwise $HINFO(id,'NTUPLE') ......... 1 if ID is a Ntuple or 0 otherwise $HINFO(id,'LOG') ............ 1 if ID has LOG Y scale or 0 otherwise $HINFO(id,'ENTRIES') ........ Number of entries $HINFO(id,'MEAN') ........... Mean value $HINFO(id,'RMS') ............ Standard deviation $HINFO(id,'EVENTS') ......... Number of equivalent events $HINFO(id,'OVERFLOW') ....... Content of overflow channel $HINFO(id,'UNDERFLOW') ...... Content of underflow channel $HINFO(id,'MIN') ............ Minimum bin content $HINFO(id,'MAX') ............ Maximum bin content $HINFO(id,'SUM') ............ Total histogram content $HINFO(id,'NSLIX') .......... Number of X slices $HINFO(id,'NSLIY') .......... Number of Y slices $HINFO(id,'NBANX') .......... Number of X bandes $HINFO(id,'NBANY') .......... Number of Y bandes $HINFO(id,'NPROX') .......... Projection X (0 or 1) $HINFO(id,'NPROY') .......... Projection Y (0 or 1) $HINFO(id,'XBINS') .......... Number of bins in X direction $HINFO(id,'XMIN') ........... Lower histogram limit in X direction $HINFO(id,'XMAX') ........... Upper histogram limit in X direction $HINFO(id,'YBINS') .......... Number of bins in Y direction $HINFO(id,'YMIN') ........... Lower histogram limit in Y direction $HINFO(id,'YMAX') ........... Upper histogram limit in Y direction $HTITLE(id) ................. Histogram title $GRAFINFO('XZONES') ......... Number of zones in X direction $GRAFINFO('YZONES') ......... Number of zones in Y direction $GRAFINFO('NT') ............. Current Normalization Transformation number $GRAFINFO('WNXMIN') ......... Lower X limit of window in current NT $GRAFINFO('WNXMAX') ......... Upper X limit of window in current NT $GRAFINFO('WNYMIN') ......... Lower Y limit of window in current NT $GRAFINFO('WNYMAX') ......... Upper Y limit of window in current NT $GRAFINFO('VPXMIN') ......... Lower X limit of viewport in current NT $GRAFINFO('VPXMAX') ......... Upper X limit of viewport in current NT $GRAFINFO('VPYMIN') ......... Lower Y limit of viewport in current NT $GRAFINFO('VPYMAX') ......... Upper Y limit of viewport in current NT $GRAFINFO('TXALIH') ......... Horizontal text alignment $GRAFINFO('TXALIV') ......... Vertical text alignment $GRAFINFO('TXFONT') ......... Text font $GRAFINFO('TXPREC') ......... Text precision $GRAFINFO('attr') ........... HPLOT/HIGZ attributes (see HELP SET for valid names) $OPTION('option') ........... 1 if the option is on 0 otherwise (see HELP OPTION) $RGBINFO(icol,'R') .......... Weight of Red in color table $RGBINFO(icol,'G') .......... Weight of Green in color table $RGBINFO(icol,'B') .......... Weight of Blue in color table $CUT(n) ..................... Cut expression $n $CUTEXPAND(string) .......... Replace $n in the (quoted) string by $CUT(n)

/KUIP/BUGREPORT [ chopt ]

CHOPT C Options D='B'

CHOPT:

'B' Send a bug report
'C' Send a comment, suggestion, etc.

Email a bug report or comment to the PAW team. The local editor is invoked with a template to be filled out. After the template has been edited, version information about PAW and the operating system is appended. The user is asked for a confirmation before the report is send.

In Paw++ this command can be accessed via the 'Help' menu of the 'Executive Window' or the 'Main Browser' (menu item 'Mail Paw++ Developers').

This command is implemented only on UNIX, VMS and VM systems.

If the environment variable PAWSUPPORT is defined it is used as email adress.

/KUIP/VERSION

Print the version string for PAW and the underlying packages.