Char

4D - Documentation   Français   English   German   Spanish   4D v11 SQL, Command Theme List   4D v11 SQL, Command Alphabetical List   4D v11 SQL, Constant Theme List   Back   Previous   Next

version 11 (Modified)


Char (charCode) String

ParameterTypeDescription
charCodeNumberCharacter code
Function resultStringCharacter represented by the charCode

Description

The Char command returns the character whose code is charCode.

If the database operates in Unicode mode (default mode for databases created starting with 4D version 11), you must pass a UTF-16 value (included between 1 and 65535) in charCode.

If the database operates in ASCII compatibility mode, you must pass an ASCII code (included between 0 and 255) in charCode.

For more information about the different modes for managing strings in 4D, please refer to the About Unicode section.

Tip: In editing a method, the command Char is commonly used to specify characters that cannot be entered from the keyboard or that would be interpreted as an editing command in the Method editor.

Important: In ASCII compatibility mode, all the text values, fields, or variables that you have not yet converted to another ASCII map are Mac OS-encoded on both Macintosh and Windows. For more information, see the section ASCII Codes.

Example

The following example uses Char to insert a carriage return within the text of an alert message:

   ALERT("Employees: "+String(Records in table([Employees]))+Char(Carriage return)+"Press OK to continue.")

See Also

About Unicode, ASCII Codes, Character code, Character Reference Symbols.


4D - Documentation   Français   English   German   Spanish   4D v11 SQL, Command Theme List   4D v11 SQL, Command Alphabetical List   4D v11 SQL, Constant Theme List   Back   Previous   Next