Parameters

Data is moved between buffers in terms of parameters. A parameter is defined as a string of characters surrounded by spaces or single quotes and residing in one of the buffers. To keep track of the parameters, each buffer has a pointer that points to the current position in the buffer.

The end of the parameter is designated by the first space encountered, unless the entire parameter is enclosed in single quotes, in which case the entire string in quotes is moved. The following Proc example displays the contents of the mds or system file.

A Proc ‘show-me’:
000 show-me
001 pq
002 hlist only
003 a2
004 p

Type show-me mds to execute this Proc. This invokes the Proc show-me, and puts the string show-me mds in the primary input buffer.

Primary Input Buffer Primary Output Buffer
show-me mds  

Secondary Input Buffer Secondary Output Buffer
   

The h command puts the text list only in the primary output buffer:

Primary Input Buffer Primary Output Buffer
show-me mds list only

Secondary Input Buffer Secondary Output Buffer
   

The a command picks up the second parameter in the input buffer from the primary input buffer and places it in the primary output buffer.

Primary Input Buffer Primary Output Buffer
show-me mds list only mds

Secondary Input Buffer Secondary Output Buffer
   

Finally, the last line of the Proc (the p command) submits the primary output buffer to TCL for processing.