22.214.171.124 Substitution Notation
Run-time substitution of LabTalk variables and variable expressions occurs routinely during Origin graphing and analysis operations. It also a cornerstone of any repetitive batch operation (import, analysis, graphing and graph export).
Substitution in Origin occurs in these four important places:
- LabTalk scripts
- Column and cell-formula expressions
- Text labels including graph axis titles, graph legends and text objects added to graphs, worksheets, etc.
- Labeling of data plots and points in graphs
When a script is executed, it is sent to the LabTalk interpreter. Among other tasks, the interpreter searches for special substitution notations, which are identified by their initial characters, % or $. When such substitution notation is found, the interpreter replaces the original string with another string. The value of the substituted string is unknown until the statement is actually executed. Thus, this procedure is called a run-time string substitution.
Types of Substitution
There are four types of run-time substitutions: