Aliases for Quantum statements
Users may define aliases for Quantum statements. These are defined in a file which may exist in the project directory or in the central Quantum directory. If an alias file exists in both locations, the aliases in the project directory are additional to those in the central file except where the two files contain the same alias code. In this case, the alias in the project directory overrides the central one.
Defining aliases
Aliases are defined one to a line in the form:
alias_name statement(s) [options]
where statement(s) and options are the statements and options which the alias represents. For example, if the alias is:
sd n17Standard Deviation
and your Quantum program contains:
sd;dec=2
Quantum replaces the alias with the statement it represents so that the line reads:
n17Standard Deviation;dec=2
The substitution does not affect any other parameters which are defined on the line.
If the alias represents more than one Quantum statement, separate them with a backslash:
msd n12Mean;dec=2\n17Standard Deviation;dec=3
You can define text to be substituted before the first semicolon in each statement, by use of an asterisk in the alias definition. For example, if the alias is:
msd n12Mean *;dec=2;nocol\n17Standard deviation of *;dec=3
the statement:
msdScore
would be expanded to:
n12Mean Score;dec=2
n17Standard Deviation of Score;dec=3
Note Because the asterisk character is used for substitution in alias statements, you must use the #include syntax and not *include, if you want to use an include file in an alias statement.
File name and location
Windows
alias.qt in the project directory or, for all jobs, in %qthome%\include. If an alias file exists in both locations, the aliases in the project directory are additional to those in %qthome%\include.
UNIX
alias.qt in the project directory or in $QTHOME/include. If an alias file exists in both locations, the aliases in the project directory are additional to those in $QTHOME/include/alias.qt except where the two files contain the same alias code. In this case, the alias in the project directory overrides the one defined in $QTHOME/include.
See also