LEDAS  
Leicester Database and Archive Service
 
Mission
    Description
Products
    Databases
Raw Data
    Archive
Analysis Software
    Archive
Ginga Information
Ginga Gallery
Related Sites
Databases
GINGALAC
GINGABGD
GINGAFRF
GINGALOG
GINGAMODE
GINGARAW
View Ginga DBs
Line
Footer
e-mail

Named Commands

An assignment statement can be used to name a command. For example

         
QCL_XADD2='X=X+2'

Note that the name must be prefixed by QCL_ to flag the symbolic name as a named command within QCL. If the name preceded by a dot is now used as a command then the assigned command will be executed.

qcl>.XADD2

In this way the user can set up a vocabulary of common or complex commands in a similar way to that available in the shell.


Supplied Named Commands

The following named commands are supplied by default to the user.

.DEFAULT

Sets all the default assignments. This is useful if you accidentally re-assign one of the defaults and you want to recover the original definition.

.DIRS <file specification>

Create a list of assignments using a file specification.

The command .DIRS sets up an array of file names F() with NF=number of names found (up to a maximum of 99).

Note that the user should not attempt to re-assign the symbolic names associated with these commands (all are prefixed by QCL_).


Foreign Dot Procedures

If QCL finds that a dot command requested is not one of the internally defined as described above or a "named command" then it does not give up but searches for a file with the same name as the command and the extension ".qcl" (indicating a QCL procedure file). It first searches the default directory and if this fails then it searches the $XMAIN directory. If all this fails then QCL gives up and issues an error message. For example the command

qcl>.spl 

does not correspond to an native dot command. However if the file $XMAIN/spl.qcl exists then the command lines will be read from the file $XMAIN/spl.qcl instead of the users terminal. The external dot command therefore points to a procedure file which is used as the command line source. Such dot commands can be used within procedure files thereby nesting the procedures.

The function QCL_CL is used to read parameter values from the command line.

QCL_CL(<number>,<prompt>,<default>)

The <number> refers to the position of the required parameter in the command line list and <prompt> and <default> are used if the requested list parameter is missing. In the above example the procedure file might contain the line

 
PDEV=QCL_CL(1,'Plotting device','xw')

If any list value is set to $ then this will force the <default> value in the QCL_CL function to be used. Note that <return> has the same effect as $.

The values in the list can be expressions involving constants and symbolic names just as arguments in a FORTRAN 77 subroutine call. Remember that literal character strings should be enclosed in single quotes.


[Top of page] [] [Previous: Structured Programming] [Back to Dot Commands]
 
HOME
SEARCH
SERVICES INFO SOFTWARE ViZieR BLASTA DSS
ARCHIVES ASCA CHANDRA GINGA ROSAT ARNIE