Qu

ord

Builtin index · Collections & strings

result = chr(n), ord(s)

Input: n · Output: result

What it is

chr(n): n is a numeric Unicode code point — not a byte, so chr(9731) is a snowman, not an error. ord(s): s is a Str; a longer string is not an error, only its FIRST character is read, so ord("Abc") is 65. asc is a second name for ord.

Overloads

One call shape — this function is not overloaded.

CodeInputOutputDescription
result = chr(n), ord(s)
n Str or stringnot documented yet
result Str or number
Returns a one-character Str from chr, and a number — the code point — from ord.

Examples

No documentation example calls this form yet. The Collections & strings chapter is where one belongs.

See also

chr — documented in the same entry.