String Table Resources
String tables are resources (embedded configuration data) edited with Workbench.
- A string table is a list of items identified by a name and referring to one or more character strings.
- String tables are typically used for defining static texts to be used in the application.
- These functions A function calculates a result according to the current value of its inputs.
A function has no internal data and is not linked to declared instances. can be used for getting access to string tables in the programs The act of performing a sequence of instructions or commands.:
- StringTable: selects the active string table.
- LoadString: Load a string from the active table.
- Each string table may contain several columns of texts for each item, and thus ease the localization of application, simply by defining a column for each language.
- This way, the language can be selected dynamically at runtime In computer science, runtime (or run-time) describes the operation of a computer program, the duration of its execution, from beginning to termination (compare compile time). In KAS, runtime refers to the virtual machine that manage the program written in a computer language while it is running. by specifying the active language (as a column) in the StringTable() function.
The name entered in the string table as an ID is automatically declared for the compiler.
- The name:
- Can directly The orientation components of a vector in space. be passed to the LoadString() function without re-declaring it.
- Must conform to IEC International Electrotechnical Commission - A not-for-profit, non-governmental international standards organization that prepares and publishes International Standards for all electrical, electronic and related technologies. standard naming rules.
You could do the same by declaring an array of STRING variables and enter some initial values for all items in the array.
- String tables provide significant advantages compared to arrays:
- The editor provides a comfortable view of multiple columns at editing.
- String tables are loaded in the application code and does not require any further RAM memory unlike declared arrays.
- The string table editor automatically declares readable IDs for any string item to be used in programs instead of working with hard-coded index Zero pulse (zero signal) of a hardware pin such as digital input or feedback pin. values.
-
- If the text is too long for the STRING variable when used at runtime, it is truncated.
Use special $ sequences in strings to specify non printable characters, according to the IEC standard:Code
Meaning
$'
A Single quote.
$$
A "$" character.
$L
A line feed character (ASCII American Standard Code for Information Interchange - ASCII provides a one-to-one mapping between alphanumeric characters and a digital one-byte word. code 10).
$N
Carriage return plus line feed characters (ASCII codes 13 and 10).
$P
A page break character (ASCII code 12).
$R
A carriage return character (ASCII code 13).
$T
A tab stop (ASCII code 9).
$xx
Any character (xx is the ASCII code expressed on two hexadecimal digits.