StringChar()
- Last UpdatedJul 13, 2023
- 1 minute read
Returns the character corresponding to a specified ASCII code.
Category
String
Syntax
StringResult = StringChar( ASCII );
Parameter
ASCII
ASCII code or an integer equipment.item.
Remarks
Use the StringChar function to add ASCII characters not normally represented on the keyboard to a string equipment.item.
This function is also useful for SQL commands. The where expression sometimes requires double quotation marks around string values, so use StringChar(34).
Example
In this example, a [Carriage Return (13)] and [Line Feed (10)] are added to the end of StringAttribute and passed to ControlString. Inserting characters out of the normal 32-126 range of displayable ASCII characters can be very useful for creating control codes for external devices such as printers or modems.
ControlString = StringAttribute+StringChar(13)+StringChar(10);