Package jason.stdlib

Class atom

java.lang.Object
All Implemented Interfaces:
InternalAction, java.io.Serializable

@Manual(literal=".atom(arg)",
        hint="checks whether the argument is an atom (a structure with arity 0)",
        argsHint="the term to be checked",
        argsType="term",
        examples={".atom(b(10)): false",".atom(b): true",".atom(~b): false",".atom(10): false",".atom(\"home page\"): false",".atom(X): only true if X is bound to an atom",".atom(a(X)): false",".atom(a[X]): false",".atom([a,b,c]): false",".atom([a,b,c(X)]): false"},
        seeAlso={"jason.stdlib.atom","jason.stdlib.list","jason.stdlib.literal","jason.stdlib.number","jason.stdlib.string","jason.stdlib.structure","jason.stdlib.ground"})
public class atom
extends DefaultInternalAction

Internal action: .atom.

Description: checks whether the argument is an atom (a structure with arity 0), for example "p". Numbers, strings, and free variables are not atoms.

Parameters:

  • + arg (any term): the term to be checked.

Examples:

  • .atom(b(10)): false.
  • .atom(b): true.
  • .atom(~b): false.
  • .atom(10): false.
  • .atom("home page"): false.
  • .atom(X): only true if X is bound to an atom.
  • .atom(a(X)): false.
  • .atom(a[X]): false.
  • .atom([a,b,c]): false.
  • .atom([a,b,c(X)]): false.
See Also:
atom, list, literal, number, string, structure, ground, Serialized Form
  • Field Details

  • Constructor Details

    • atom

      public atom()
  • Method Details