4.26 FAQ-385 What is Substitution Notation?

Last Update: 3/31/2023

When a script is executed, the LabTalk interpreter searches for two types of special substitution notation which are identified by the initial characters of % or $. These are then sent to the substitution processor, which replaces the original string with another string.

There are four types of run-time substitutions:

String register substitution %A - %Z, etc. %( ) Substitution, a powerful notation to resolve %(str$), %(range), worksheet info and column dataset names, worksheet cells, legends, etc. $( ) Substitution, where $(expression) resolves the numeric expression and formats the result as a string. %n Macro and Script substitutions of the form %n, where arguments are passed to a macro or a script.


Please see the Substitution Notation for more details and examples.


Keywords:string, convert, substitute, transform, %, $