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_mbchars()
            • PL_atom_chars()
            • PL_new_functor()
            • PL_functor_name()
            • PL_functor_arity()
            • Atoms and atom garbage collection
    • Packages
Availability:C-language interface function
functor_t PL_new_functor(atom_t name, int arity)
Returns a functor identifier, a handle for the name/arity pair. The returned handle is valid for the entire Prolog session. Future versions may garbage collect functors as part of atom garbage collection. Currently aborts the process with a fatal error on failure. Future versions may raise a resource exception and return (atom_t)0.