Alias()

Allows the definition of aliases for command names and qualifiers

ALIAS [alias_name=String] [full_name=String] Define one or more aliases for commands and qualifiers.

example:

	# Some aliases defined for the display command
	>> alias "d/e/m/l" "display/errors/markers/line"
	>> d/e/l
	
	# can have more than one alias defined for a command
	>> alias "showit/Ebars/stars/wigglything" "display/errors/markers/line"
	
	>> showit/e_bars/wigglything

Note: Open GENIE already defines some common aliases for commands (eg d/e for display/errors).

Alias

The Alias() command is provided as a convenience for the command line interface to Open GENIE. It allows any Open GENIE procedure to effectively take on another, usually shorter name. The same can be done for any qualifiers taken by the procedure. The command relies on matching up the names of the real command and qualifiers with the names you wish to alias them to. The procedure and number of qualifiers must match in the two strings and those in the second string must be a valid command and its qualifiers (or they will not work).

This command is so powerful that some care should be used when exercising it! Note that it is entirely possible to define aliases which swap or duplicate the meanings of procedures and qualifiers.

A more serious use for this command is when defining a custom procedure in place of a standard Open GENIE procedure. For example, say we wish to redefine the Spectrum() command to load up some custom two theta values. By aliasing the original Spectrum command as old_spectrum. We can write a new Spectrum() procedudure which first calls the old old_spectrum() procedure to get most of the data and then add our own code to fix the two theta values. To the user, there is no change to how the command works and they can still call Spectrum() but will get the modified version (Note that without aliasing the name, Open GENIE would think that we were writing Spectrum() as a recursive procedure).

Parameters:

Alias_name (String)

These are the new (fictitious) names for the command and its qualifiers. It is not necessary to specify all the qualifiers a command has, just the ones that you wish to abbreviate or alias. Any unspecified qualifiers from the original command will still work perfectly with the new command name.

full_name (String)

The exact command name and qualifiers which we wish to alias, keeping the order so that this list matches the aliasing parameters in number and position.