atom_to_list

Kent Boortz kent@REDACTED
Mon Sep 2 00:33:20 CEST 2002


Jilani Khaldi <jilani.khaldi@REDACTED> writes:
> why atom_to_list(abc) gives me 'abc' instead of [97,98,99]?

You probably mean "abc"? It is the same thing, try 

  1> [97,98,99].
  "abc"
  2> [97,98,99] == "abc".
  true

Strings in Erlang don't have their own type, it is a list of
character codes. The Erlang shell output routines try to 
output it in a string format if it can but is just guessing,

kent



More information about the erlang-questions mailing list