INCLAN Reference Manual: Difference between revisions
No edit summary |
|||
Line 5: | Line 5: | ||
== INCLAN Commands == | == INCLAN Commands == | ||
When reading an input command line the command interpreter executes the following steps: | |||
* An optional comment, i.e. text following a comment sign “#”, is discarded. | |||
* The values of variables are substituted from right to left. | |||
* The command line is split into elements, defined as sequences of non-blank characters separated by blank characters. The first element becomes the command name. The following elements become command parameters. | |||
* If the command name matches a user-defined alias, the alias is expanded. | |||
* If the command name matches a built-in command of INCLAN, it is executed by the command interpreter itself. | |||
* Otherwise, if the command name matches a user-defined command (see INCLAN command command below), it is executed by the command interpreter. | |||
* Otherwise, if the command name matches a command of the underlying program unambiguously, it is executed by the program. | |||
* Otherwise, the command interpreter looks for a macro with the given command name and, if it is found in the current macro search path, executes it. If no such macro is found, an error occurs. | |||
<div style="column-count:4;-moz-column-count:4;-webkit-column-count:4"> | <div style="column-count:4;-moz-column-count:4;-webkit-column-count:4"> |
Revision as of 16:44, 11 August 2009
The user interface of the program CYANA is based on INCLAN, a powerful interactive command language that allows the use of variables, mathematical and character expressions, macros, flow control (loops, conditional statements, jumps), parallelization on shared-memory and distributed-memory systems, and the production of graphics. INCLAN separates the user interface from the specific functions of the underlying program. It allows new commands to be implemented quickly, either in the compiled source code of the program or as interpreted INCLAN scripts. In both cases the command line syntax follows the same, uniform rules, and is automatically checked by INCLAN for consistency and correct data typing. The output of the program is controlled and formatted by INCLAN, which allows the amount and destination of informative output to be defined in a uniform way. The INCLAN command language is an interpreted language that combines features of Unix shell scripts, e.g. the use variable substitutions in the command line, with those of high-level programming languages, e.g. sophisticated mathematical functions and expressions. The current version of INCLAN is implemented in Fortran-95, and is used as the command interpreter of several program packages written in Fortran and C++, including CYANA, DYANA, GARANT, OPALp, and PROSA.
In the following, literal INCLAN input and output is shown in Courier font. Non-literal input is shown in italics. Optional arguments are enclosed in square brackets “[…]”. In an argument list the ellipsis “…” indicates that the preceding parameter can be repeated.
INCLAN Commands
When reading an input command line the command interpreter executes the following steps:
- An optional comment, i.e. text following a comment sign “#”, is discarded.
- The values of variables are substituted from right to left.
- The command line is split into elements, defined as sequences of non-blank characters separated by blank characters. The first element becomes the command name. The following elements become command parameters.
- If the command name matches a user-defined alias, the alias is expanded.
- If the command name matches a built-in command of INCLAN, it is executed by the command interpreter itself.
- Otherwise, if the command name matches a user-defined command (see INCLAN command command below), it is executed by the command interpreter.
- Otherwise, if the command name matches a command of the underlying program unambiguously, it is executed by the program.
- Otherwise, the command interpreter looks for a macro with the given command name and, if it is found in the current macro search path, executes it. If no such macro is found, an error occurs.
INCLAN Variables
INCLAN Graphics
- plot arc
- plot caro, plot cross, plot dot, plot plus, plot square, plot triangle
- plot clip
- plot close
- plot comment
- plot curve
- plot errorbar
- plot file
- plot fit
- plot frame
- plot function
- plot label
- plot line
- plot mif, plot ps
- plot polygon
- plot rectangle
- plot scale
- plot set
- plot shape
- plot spline
- plot text
- plot write