forked from gap-system/gap
-
Notifications
You must be signed in to change notification settings - Fork 0
/
bool.h
126 lines (100 loc) · 3.62 KB
/
bool.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
/****************************************************************************
**
*W bool.h GAP source Martin Schoenert
**
*H @(#)$Id$
**
*Y Copyright (C) 1996, Lehrstuhl D fuer Mathematik, RWTH Aachen, Germany
**
** This file declares the functions for the boolean package.
*/
#ifdef INCLUDE_DECLARATION_PART
SYS_CONST char * Revision_bool_h =
"@(#)$Id$";
#endif
/****************************************************************************
**
*V True . . . . . . . . . . . . . . . . . . . . . . . . . . . . true value
**
** 'True' is the value 'true'.
*/
extern Obj True;
/****************************************************************************
**
*V False . . . . . . . . . . . . . . . . . . . . . . . . . . . . false value
**
** 'False' is the value 'false'.
*/
extern Obj False;
/****************************************************************************
**
*V Fail . . . . . . . . . . . . . . . . . . . . . . . . . . . . fail value
**
** 'Fail' is the value 'fail'.
*/
extern Obj Fail;
/****************************************************************************
**
*F ReturnTrue1( <val1> ) . . . . . . . . . . . . . . . . . . return 'True'
*F ReturnTrue2( <val1>, <val2> ) . . . . . . . . . . . . . . return 'True'
*F ReturnTrue3( <val1>, <val2>, <val3> ) . . . . . . . . . . return 'True'
*F ReturnFalse1( <val1> ) . . . . . . . . . . . . . . . . . return 'False'
*F ReturnFalse2( <val1>, <val2> ) . . . . . . . . . . . . . return 'False'
*F ReturnFalse3( <val1>, <val2>, <val3> ) . . . . . . . . . return 'False'
*F ReturnFail1( <val1> ) . . . . . . . . . . . . . . . . . . return 'Fail'
*F ReturnFail2( <val1>, <val2> ) . . . . . . . . . . . . . . return 'Fail'
*F ReturnFail3( <val1>, <val2>, <val3> ) . . . . . . . . . . return 'Fail'
**
** 'ReturnTrue?' simply return 'True' independent of the values of the
** arguments.
**
** 'ReturnFalse?' likewise return 'False'.
**
** 'ReturnFail?' likewise return 'Fail'.
**
** Those functions are useful for dispatcher tables if the types already
** determine the outcome.
*/
extern Obj ReturnTrue1 (
Obj self,
Obj val1 );
extern Obj ReturnTrue2 (
Obj self,
Obj val1,
Obj val2 );
extern Obj ReturnTrue3 (
Obj self,
Obj val1,
Obj val2,
Obj val3 );
extern Obj ReturnFalse1 (
Obj self,
Obj val1 );
extern Obj ReturnFalse2 (
Obj self,
Obj val1,
Obj val2 );
extern Obj ReturnFalse3 (
Obj self,
Obj val1,
Obj val2,
Obj val3 );
extern Obj ReturnFail1 (
Obj self,
Obj val1 );
extern Obj ReturnFail2 (
Obj self,
Obj val1,
Obj val2 );
extern Obj ReturnFail3 (
Obj self,
Obj val1,
Obj val2,
Obj val3 );
/****************************************************************************
**
*E InitBool() . . . . . . . . . . . . . . . initialize the booleans package
**
** 'InitBool' initializes the boolean package.
*/
extern void InitBool ( void );