12.4.3.1 Testing the type of a term
AllApplicationManualNameSummaryHelp

  • Documentation
    • Reference manual
      • Foreign Language Interface
        • The Foreign Include File
          • Analysing Terms via the Foreign Interface
            • Testing the type of a term
              • PL_term_type()
              • PL_is_variable()
              • PL_is_ground()
              • PL_is_atom()
              • PL_is_string()
              • PL_is_integer()
              • PL_is_rational()
              • PL_is_float()
              • PL_is_callable()
              • PL_is_compound()
              • PL_is_functor()
              • PL_is_list()
              • PL_is_pair()
              • PL_is_dict()
              • PL_is_atomic()
              • PL_is_number()
              • PL_is_acyclic()
    • Packages
Availability:C-language interface function
int PL_is_rational(term_t)
Returns non-zero if term is a rational number (P/Q). Note that all integers are considered rational and this test thus succeeds for any term for which PL_is_integer() succeeds. See also PL_get_mpq() and PL_unify_mpq().