/**************************************************************************** ** ** This file is part of GAP, a system for computational discrete algebra. ** ** Copyright of GAP belongs to its developers, whose names are too numerous ** to list here. Please refer to the COPYRIGHT file for details. ** ** SPDX-License-Identifier: GPL-2.0-or-later ** ** This file contains the functions for the boolean package. ** ** Note that boolean objects actually contain no data. The three of them ** are distinguished by their addresses, kept in the C globals False, ** True and Fail.
*/
/**************************************************************************** ** *V Undefined . . . . . . . . . . . . . . . . . . . . . . . undefined value ** ** 'Undefined' is a special object that is used in lieu of (Obj) 0 in places ** where the kernel cannot handle a null reference easily. This object is ** never exposed to GAP code and only used within the kernel.
*/
Obj Undefined;
/**************************************************************************** ** *F TypeBool( <bool> ) . . . . . . . . . . . . . . . type of a boolean value ** ** 'TypeBool' returns the type of boolean values. ** ** 'TypeBool' is the function in 'TypeObjFuncs' for boolean values.
*/ static Obj TYPE_BOOL;
/**************************************************************************** ** *F InitKernel( <module> ) . . . . . . . . initialise kernel data structures
*/ staticInt InitKernel (
StructInitInfo * module )
{ // set the bag type names (for error messages and debugging)
InitBagNamesFromTable( BagNames );
// install the marking functions for boolean values
InitMarkFuncBags( T_BOOL, MarkNoSubBags );
// init filters and functions
InitHdlrFiltsFromTable( GVarFilts );
// make and install the 'RETURN_TRUE' function
InitHandlerFunc( ReturnTrue1, "src/bool.c:ReturnTrue1" );
InitHandlerFunc( ReturnTrue2, "src/bool.c:ReturnTrue2" );
InitHandlerFunc( ReturnTrue3, "src/bool.c:ReturnTrue3" );
// make and install the 'RETURN_FALSE' function
InitHandlerFunc( ReturnFalse1, "src/bool.c:ReturnFalse1" );
InitHandlerFunc( ReturnFalse2, "src/bool.c:ReturnFalse2" );
InitHandlerFunc( ReturnFalse3, "src/bool.c:ReturnFalse3" );
// make and install the 'RETURN_FAIL' function
InitHandlerFunc( ReturnFail1, "src/bool.c:ReturnFail1" );
InitHandlerFunc( ReturnFail2, "src/bool.c:ReturnFail2" );
InitHandlerFunc( ReturnFail3, "src/bool.c:ReturnFail3" );
// install the type function
ImportGVarFromLibrary( "TYPE_BOOL", &TYPE_BOOL );
TypeObjFuncs[ T_BOOL ] = TypeBool;
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung ist noch experimentell.