name/2 — converts strings to atoms and atoms to strings
Constant is instantiated to an atom or a number,
PrintName is unified with a list of ASCII codes that correspond to the printed representation of
PrintName is a list of ASCII codes,
Constant will be unified with the atom or number whose printed representation is the string
?- name( Symbol, [0'a,0'l,0'i,0'e,0'n,0's] ). Symbol = aliens yes. ? - name(aliens, "aliens" ). yes. ? - name(, "" ). yes. ? - name(2018, X). X = [50,48,49,56] yes. ? - name(X, "2018"). X = 2018 % Note that 2018 is an integer, not a symbol yes.