next up previous contents index
Next: Math Functions and Operators Up: TK User Interface Previous: User Commands

Entering Commands from a File

Some of the responses can come from a file, enter @file, where .COM is the default type, at any node. Up to 8 levels of indirection are supported. When the end of a file is reached, input reverts to the previous level. If an error occurs while entries are being supplied from a file, the program will abort. This example gets symbol constraints from a file:

        $ LOCUS 
        ...
        PL S @ipcons ;
where IP_CONS.COM contains
        "IP BETWEEN 1.5 AND 2.5"
        "IP BETWEEN 2.5 AND 3.5"
        "IP BETWEEN 3.5 AND 4.5"
You can put comments in indirect files beginning with !. To create an indirect file, you can execute LOCUS and at any node enter >file.com. This will record subsequent questions as comments and your responses in the file. When you want to save the file enter >. If you invoke LOCUS from the terminal, the program is still running interactively and the after-graph responses will be taken from the terminal. If you invoke LOCUS from a command file then the after-graph responses must appear in the command file.
After-graph responses from the terminal
In this example, LOCUS plots MB_IP_SL vs FM_LD_06 then waits for input from the terminal. After you enter RETURN, FM_LD_01 vs FM_LD_06 is plotted and LOCUS again waits for an after-graph response. You could enter F to get fit the data, then RETURN to continue.
	$ LOCUS 
	...
	@plots
where PLOTS.COM contains:
          X FM_LD_06 Y MB_IP_SL ;
          Y FM_LD_01 ;

After-graph responses from the command file
In this example, LOCUS makes the plots without further input from the keyboard. It gets the after-graph responses from the file. Note that a fit will be done of FM_LD_01 vs FM_LD_06.
	$ @locus_plots
where LOCUS_PLOTS.COM contains:
          $ LOCUS 
          DB TFTR PT WAVEF; ET XEXPS; ;
          PL X FM_LD_06 Y MB_IP_SL ;
	
          Y FM_LD_01 ;
          F
	  
          \x



Marilee Thompson
Fri Jul 11 17:05:56 EDT 1997