CHR
The CHR function allows formatting characters such as spaces, line breaks, and tabs to be included in an expression. ASCII codes are used to represent the required characters, for example, 10 represents line feed. Information about ASCII codes is widely available on the Internet.
Function Name |
CHR |
Description |
Allows formatting characters to be included in an expression. |
Arguments |
CHR(INTEGER or REAL) The integer or real floating value is an expression that corresponds to an ASCII character (range 0 to 127). For information on integers and real floating values—see Number (Integer or Real). |
Returns |
STRING |
Example:
A shape on a Mimic is animated to represent an analog point. A ToolTip is required for the shape—the ToolTip is to provide the High High and High alarm levels for the point. To achieve this, the shape's TooltipText property is animated by the following expression:
'Alarm Limits ' + CHR( 10 ) + ".AI.HighHighDesc" + ': ' + STR(".AI.HighHighLimit" ) + CHR( 10 ) + ".AI.HighDesc" + ': ' + STR(".AI.HighLimit" )
Where:
'Alarm Limits'
is a text string that is followed by a line break (represented by CHR( 10 )
).
"AI.HighHighDesc"
is the High High Description value of the "AI" point.
"AI.HighHighLimit"
is the High High Limit value of the "AI" point. This is followed by another line break (CHR(10)
).
"AI.HighDesc"
is the High Description value of the "AI" point.
"AI.HighLimit"
is the High Limit value of the "AI" point.
The STR function is also required.
The ToolTip for the shape displays the following information:
See also: