INCLAN: Commands: Difference between revisions
		
		
		
		
		
		Jump to navigation
		Jump to search
		
				
		
		
	
|  (Created page with '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. •	Th…') | No edit summary | ||
| Line 1: | Line 1: | ||
| When reading an input command line the command interpreter executes the following steps: | 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. | |||
Revision as of 18:15, 11 August 2009
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.