niiyz
5/12/2015 - 11:04 AM

Erlang アトム 2015.05.12

Erlang アトム 2015.05.12

30> apple.
apple
31> hello_world.
hello_world
32> Atom = atom.
atom
33> Atom = apple.
** exception error: no match of right hand side value apple
34> Atom = atom.
atom
35> Apple.
* 1: variable 'Apple' is unbound
36> 'Apple'.
'Apple'
37> is_atom(apple).
true
38> is_atom(yoshida).
true
39> is_atom("hello").
false
40> is_atom("yoshida").
false
41> is_boolean(false).
true
42> is_boolean(apple).
false
43> atom_to_list(hello).
"hello"
44> list_to_atom("apple").
apple
45>