12.4.2 Atoms and functors
AllApplicationManualNameSummaryHelp

  • Documentation
    • Reference manual
      • Foreign Language Interface
        • The Foreign Include File
          • Atoms and functors
            • PL_new_atom()
            • PL_new_atom_mbchars()
            • PL_atom_chars()
            • PL_new_functor()
            • PL_functor_name()
            • PL_functor_arity()
            • Atoms and atom garbage collection
    • Packages
Availability:C-language interface function
const char* PL_atom_chars(atom_t atom)
Return a C-string for the text represented by the given atom. The returned text will not be changed by Prolog. It is not allowed to modify the contents, not even `temporary' as the string may reside in read-only memory. The returned string becomes invalid if the atom is garbage collected (see section 12.4.2.1). Foreign functions that require the text from an atom passed in a term_t normally use PL_get_atom_chars() or PL_get_atom_nchars().