12.1 Objects

Nearly all things one deals with in GAP are objects. For example, an integer is an object, as is a list of integers, a matrix, a permutation, a function, a list of functions, a record, a group, a coset or a conjugacy class in a group.

Examples of things that are not objects are comments which are only lexical constructs, while loops which are only syntactical constructs, and expressions, such as 1 + 1; but note that the value of an expression, in this case the integer 2, is an object.

Objects can be assigned to variables, and everything that can be assigned to a variable is an object. Analogously, objects can be used as arguments of functions, and can be returned by functions.

  • IsObject( obj ) C

    IsObject returns true if the object obj is an object. Obviously it can never return false.

    It can be used as a filter in InstallMethod (see Method Installation in ``Programming in GAP'') when one of the arguments can be anything.

    [Top] [Up] [Next] [Index]

    GAP 4 manual
    February 2000