4
$\begingroup$

Is it possible to convert a charcode/keycode to a string?

I want to do this to create variables in a generated equation.

$\endgroup$

1 Answer 1

16
$\begingroup$

You can use

ToCharacterCode["abcABCαβγ"]
(*
=>    {97, 98, 99, 65, 66, 67, 945, 946, 947}
*)
FromCharacterCode[%]
(*
=>    "abcABCαβγ"
*)

To create unique symbols, use

Unique["x"]
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.