False.st
author Patrik Svestka <patrik.svestka@gmail.com>
Thu, 02 Dec 2021 12:27:29 +0100
branchjv
changeset 25440 039a5cea86c3
parent 20206 51652e7f46dd
permissions -rw-r--r--
Fixing incorrect order of classes when loading The following is correct autoload order: - UnixDesktop - XDGDesktop - GNOMEDesktop
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1
a27a279701f8 Initial revision
claus
parents:
diff changeset
     1
"
5
67342904af11 *** empty log message ***
claus
parents: 3
diff changeset
     2
 COPYRIGHT (c) 1988 by Claus Gittinger
379
5b5a130ccd09 revision added
claus
parents: 92
diff changeset
     3
	      All Rights Reserved
1
a27a279701f8 Initial revision
claus
parents:
diff changeset
     4
a27a279701f8 Initial revision
claus
parents:
diff changeset
     5
 This software is furnished under a license and may be used
a27a279701f8 Initial revision
claus
parents:
diff changeset
     6
 only in accordance with the terms of that license and with the
a27a279701f8 Initial revision
claus
parents:
diff changeset
     7
 inclusion of the above copyright notice.   This software may not
a27a279701f8 Initial revision
claus
parents:
diff changeset
     8
 be provided or otherwise made available to, or used by, any
a27a279701f8 Initial revision
claus
parents:
diff changeset
     9
 other person.  No title to or ownership of the software is
a27a279701f8 Initial revision
claus
parents:
diff changeset
    10
 hereby transferred.
a27a279701f8 Initial revision
claus
parents:
diff changeset
    11
"
6906
87afb9964006 comments
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
    12
"{ Package: 'stx:libbasic' }"
87afb9964006 comments
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
    13
19112
mawalch
parents: 11917
diff changeset
    14
"{ NameSpace: Smalltalk }"
mawalch
parents: 11917
diff changeset
    15
1
a27a279701f8 Initial revision
claus
parents:
diff changeset
    16
Boolean subclass:#False
1238
a1b8da9895ad commentary
Claus Gittinger <cg@exept.de>
parents: 692
diff changeset
    17
	instanceVariableNames:''
a1b8da9895ad commentary
Claus Gittinger <cg@exept.de>
parents: 692
diff changeset
    18
	classVariableNames:''
a1b8da9895ad commentary
Claus Gittinger <cg@exept.de>
parents: 692
diff changeset
    19
	poolDictionaries:''
a1b8da9895ad commentary
Claus Gittinger <cg@exept.de>
parents: 692
diff changeset
    20
	category:'Kernel-Objects'
1
a27a279701f8 Initial revision
claus
parents:
diff changeset
    21
!
a27a279701f8 Initial revision
claus
parents:
diff changeset
    22
88
81dacba7a63a *** empty log message ***
claus
parents: 54
diff changeset
    23
!False class methodsFor:'documentation'!
81dacba7a63a *** empty log message ***
claus
parents: 54
diff changeset
    24
81dacba7a63a *** empty log message ***
claus
parents: 54
diff changeset
    25
copyright
81dacba7a63a *** empty log message ***
claus
parents: 54
diff changeset
    26
"
81dacba7a63a *** empty log message ***
claus
parents: 54
diff changeset
    27
 COPYRIGHT (c) 1988 by Claus Gittinger
379
5b5a130ccd09 revision added
claus
parents: 92
diff changeset
    28
	      All Rights Reserved
1
a27a279701f8 Initial revision
claus
parents:
diff changeset
    29
88
81dacba7a63a *** empty log message ***
claus
parents: 54
diff changeset
    30
 This software is furnished under a license and may be used
81dacba7a63a *** empty log message ***
claus
parents: 54
diff changeset
    31
 only in accordance with the terms of that license and with the
81dacba7a63a *** empty log message ***
claus
parents: 54
diff changeset
    32
 inclusion of the above copyright notice.   This software may not
81dacba7a63a *** empty log message ***
claus
parents: 54
diff changeset
    33
 be provided or otherwise made available to, or used by, any
81dacba7a63a *** empty log message ***
claus
parents: 54
diff changeset
    34
 other person.  No title to or ownership of the software is
81dacba7a63a *** empty log message ***
claus
parents: 54
diff changeset
    35
 hereby transferred.
81dacba7a63a *** empty log message ***
claus
parents: 54
diff changeset
    36
"
81dacba7a63a *** empty log message ***
claus
parents: 54
diff changeset
    37
!
1
a27a279701f8 Initial revision
claus
parents:
diff changeset
    38
88
81dacba7a63a *** empty log message ***
claus
parents: 54
diff changeset
    39
documentation
81dacba7a63a *** empty log message ***
claus
parents: 54
diff changeset
    40
"
81dacba7a63a *** empty log message ***
claus
parents: 54
diff changeset
    41
    False has only one instance, false, representing logical falsehood.
1238
a1b8da9895ad commentary
Claus Gittinger <cg@exept.de>
parents: 692
diff changeset
    42
88
81dacba7a63a *** empty log message ***
claus
parents: 54
diff changeset
    43
    Some methods are implemented here and in True, instead of the common
20195
fac36b1a37bf #OTHER by mawalch
mawalch
parents: 19112
diff changeset
    44
    superclass Boolean. This has the advantage that no truth-value checks
fac36b1a37bf #OTHER by mawalch
mawalch
parents: 19112
diff changeset
    45
    are needed, but instead the truth check is done in the method lookup.
88
81dacba7a63a *** empty log message ***
claus
parents: 54
diff changeset
    46
    However, remember that some messages to booleans are inline coded in
81dacba7a63a *** empty log message ***
claus
parents: 54
diff changeset
    47
    the compilers (both interpreted and machine code). Therefore redefinition
81dacba7a63a *** empty log message ***
claus
parents: 54
diff changeset
    48
    of some methods here will not have any effect on compiled code.
81dacba7a63a *** empty log message ***
claus
parents: 54
diff changeset
    49
    (redefining ifTrue: to something else will probably crash the smalltalk
81dacba7a63a *** empty log message ***
claus
parents: 54
diff changeset
    50
     world anyway ...)
1294
e26bbb61f6b2 documentation
Claus Gittinger <cg@exept.de>
parents: 1238
diff changeset
    51
1303
8fdc2c653d13 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1294
diff changeset
    52
    [see also:]
8fdc2c653d13 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1294
diff changeset
    53
        True
8fdc2c653d13 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1294
diff changeset
    54
1294
e26bbb61f6b2 documentation
Claus Gittinger <cg@exept.de>
parents: 1238
diff changeset
    55
    [author:]
e26bbb61f6b2 documentation
Claus Gittinger <cg@exept.de>
parents: 1238
diff changeset
    56
        Claus Gittinger
574
5e7cbb66d6c7 testing cvs
Claus Gittinger <cg@exept.de>
parents: 573
diff changeset
    57
"
692
24ea6761b4a9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 574
diff changeset
    58
! !
1
a27a279701f8 Initial revision
claus
parents:
diff changeset
    59
11759
7772f14f36ae +asInteger
Claus Gittinger <cg@exept.de>
parents: 10817
diff changeset
    60
19112
mawalch
parents: 11917
diff changeset
    61
1
a27a279701f8 Initial revision
claus
parents:
diff changeset
    62
!False methodsFor:'conditional evaluation'!
a27a279701f8 Initial revision
claus
parents:
diff changeset
    63
a27a279701f8 Initial revision
claus
parents:
diff changeset
    64
and:aBlock
a27a279701f8 Initial revision
claus
parents:
diff changeset
    65
    "evaluate aBlock if the receiver is true.
11917
de1675e8ba46 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 11825
diff changeset
    66
     (since the receiver is known to be false here, always return false here).
3044
a0bbac91639b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1303
diff changeset
    67
     Notice:
11917
de1675e8ba46 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 11825
diff changeset
    68
        This method is open coded (inlined) by the compiler(s)
de1675e8ba46 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 11825
diff changeset
    69
        - redefining it may not work as expected."
1
a27a279701f8 Initial revision
claus
parents:
diff changeset
    70
a27a279701f8 Initial revision
claus
parents:
diff changeset
    71
    ^ self
a27a279701f8 Initial revision
claus
parents:
diff changeset
    72
!
a27a279701f8 Initial revision
claus
parents:
diff changeset
    73
11818
fc605f85aaf7 changed #and:and:
Claus Gittinger <cg@exept.de>
parents: 11759
diff changeset
    74
and:block1 and:block2
11917
de1675e8ba46 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 11825
diff changeset
    75
    "evaluate block1 if the receiver is true; if that also returns true, evaluate block2.
de1675e8ba46 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 11825
diff changeset
    76
     (since the receiver is known to be false here, always return false here).
de1675e8ba46 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 11825
diff changeset
    77
     Notice:
de1675e8ba46 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 11825
diff changeset
    78
        This method is open coded (inlined) by the compiler(s)
de1675e8ba46 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 11825
diff changeset
    79
        - redefining it may not work as expected."
11825
c93f1263c53d +and:and...
Claus Gittinger <cg@exept.de>
parents: 11818
diff changeset
    80
c93f1263c53d +and:and...
Claus Gittinger <cg@exept.de>
parents: 11818
diff changeset
    81
    ^ self
c93f1263c53d +and:and...
Claus Gittinger <cg@exept.de>
parents: 11818
diff changeset
    82
!
c93f1263c53d +and:and...
Claus Gittinger <cg@exept.de>
parents: 11818
diff changeset
    83
c93f1263c53d +and:and...
Claus Gittinger <cg@exept.de>
parents: 11818
diff changeset
    84
and:block1 and:block2 and:block3
c93f1263c53d +and:and...
Claus Gittinger <cg@exept.de>
parents: 11818
diff changeset
    85
    "return false"
c93f1263c53d +and:and...
Claus Gittinger <cg@exept.de>
parents: 11818
diff changeset
    86
c93f1263c53d +and:and...
Claus Gittinger <cg@exept.de>
parents: 11818
diff changeset
    87
    ^ self
c93f1263c53d +and:and...
Claus Gittinger <cg@exept.de>
parents: 11818
diff changeset
    88
!
c93f1263c53d +and:and...
Claus Gittinger <cg@exept.de>
parents: 11818
diff changeset
    89
c93f1263c53d +and:and...
Claus Gittinger <cg@exept.de>
parents: 11818
diff changeset
    90
and:block1 and:block2 and:block3 and:block4
c93f1263c53d +and:and...
Claus Gittinger <cg@exept.de>
parents: 11818
diff changeset
    91
    "return false"
c93f1263c53d +and:and...
Claus Gittinger <cg@exept.de>
parents: 11818
diff changeset
    92
11818
fc605f85aaf7 changed #and:and:
Claus Gittinger <cg@exept.de>
parents: 11759
diff changeset
    93
    ^ self
fc605f85aaf7 changed #and:and:
Claus Gittinger <cg@exept.de>
parents: 11759
diff changeset
    94
!
fc605f85aaf7 changed #and:and:
Claus Gittinger <cg@exept.de>
parents: 11759
diff changeset
    95
1
a27a279701f8 Initial revision
claus
parents:
diff changeset
    96
ifFalse:aBlock
9225
5bf44f0ac937 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9000
diff changeset
    97
    "If the receiver is false, return the value of evaluating aBlock; nil otherwise.
5bf44f0ac937 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9000
diff changeset
    98
     Since the receiver is definitely false here, unconditionally return the blocks value.
3044
a0bbac91639b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1303
diff changeset
    99
     Notice:
9225
5bf44f0ac937 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9000
diff changeset
   100
        This method is open coded (inlined) by the compiler(s)
5bf44f0ac937 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9000
diff changeset
   101
        - redefining it may not work as expected."
1
a27a279701f8 Initial revision
claus
parents:
diff changeset
   102
a27a279701f8 Initial revision
claus
parents:
diff changeset
   103
    ^ aBlock value
a27a279701f8 Initial revision
claus
parents:
diff changeset
   104
!
a27a279701f8 Initial revision
claus
parents:
diff changeset
   105
574
5e7cbb66d6c7 testing cvs
Claus Gittinger <cg@exept.de>
parents: 573
diff changeset
   106
ifFalse:falseBlock ifTrue:trueBlock
5e7cbb66d6c7 testing cvs
Claus Gittinger <cg@exept.de>
parents: 573
diff changeset
   107
    "return the value of evaluating falseBlock (since the receiver is false)
3044
a0bbac91639b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1303
diff changeset
   108
     Notice:
a0bbac91639b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1303
diff changeset
   109
	This method is open coded (inlined) by the compiler(s)
a0bbac91639b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1303
diff changeset
   110
	- redefining it may not work as expected."
574
5e7cbb66d6c7 testing cvs
Claus Gittinger <cg@exept.de>
parents: 573
diff changeset
   111
5e7cbb66d6c7 testing cvs
Claus Gittinger <cg@exept.de>
parents: 573
diff changeset
   112
    ^ falseBlock value
5e7cbb66d6c7 testing cvs
Claus Gittinger <cg@exept.de>
parents: 573
diff changeset
   113
!
5e7cbb66d6c7 testing cvs
Claus Gittinger <cg@exept.de>
parents: 573
diff changeset
   114
1
a27a279701f8 Initial revision
claus
parents:
diff changeset
   115
ifTrue:aBlock
9225
5bf44f0ac937 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9000
diff changeset
   116
    "If the receiver is true, return the value of evaluating aBlock; nil otherwise.
5bf44f0ac937 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9000
diff changeset
   117
     Since the receiver is definitely false here, unconditionally return nil value.
3044
a0bbac91639b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1303
diff changeset
   118
     Notice:
9225
5bf44f0ac937 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9000
diff changeset
   119
        This method is open coded (inlined) by the compiler(s)
5bf44f0ac937 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9000
diff changeset
   120
        - redefining it may not work as expected."
1
a27a279701f8 Initial revision
claus
parents:
diff changeset
   121
a27a279701f8 Initial revision
claus
parents:
diff changeset
   122
    ^ nil
a27a279701f8 Initial revision
claus
parents:
diff changeset
   123
!
a27a279701f8 Initial revision
claus
parents:
diff changeset
   124
a27a279701f8 Initial revision
claus
parents:
diff changeset
   125
ifTrue:trueBlock ifFalse:falseBlock
a27a279701f8 Initial revision
claus
parents:
diff changeset
   126
    "return the value of evaluating falseBlock (since the receiver is false)
3044
a0bbac91639b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1303
diff changeset
   127
     Notice:
a0bbac91639b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1303
diff changeset
   128
	This method is open coded (inlined) by the compiler(s)
a0bbac91639b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1303
diff changeset
   129
	- redefining it may not work as expected."
1
a27a279701f8 Initial revision
claus
parents:
diff changeset
   130
a27a279701f8 Initial revision
claus
parents:
diff changeset
   131
    ^ falseBlock value
a27a279701f8 Initial revision
claus
parents:
diff changeset
   132
!
a27a279701f8 Initial revision
claus
parents:
diff changeset
   133
574
5e7cbb66d6c7 testing cvs
Claus Gittinger <cg@exept.de>
parents: 573
diff changeset
   134
or:aBlock
5e7cbb66d6c7 testing cvs
Claus Gittinger <cg@exept.de>
parents: 573
diff changeset
   135
    "evaluate aBlock if the receiver is false.
5e7cbb66d6c7 testing cvs
Claus Gittinger <cg@exept.de>
parents: 573
diff changeset
   136
     (since the receiver is false return the value of evaluating aBlock).
3044
a0bbac91639b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1303
diff changeset
   137
     Notice:
a0bbac91639b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1303
diff changeset
   138
	This method is open coded (inlined) by the compiler(s)
a0bbac91639b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1303
diff changeset
   139
	- redefining it may not work as expected."
1
a27a279701f8 Initial revision
claus
parents:
diff changeset
   140
574
5e7cbb66d6c7 testing cvs
Claus Gittinger <cg@exept.de>
parents: 573
diff changeset
   141
    ^ aBlock value
11825
c93f1263c53d +and:and...
Claus Gittinger <cg@exept.de>
parents: 11818
diff changeset
   142
!
c93f1263c53d +and:and...
Claus Gittinger <cg@exept.de>
parents: 11818
diff changeset
   143
c93f1263c53d +and:and...
Claus Gittinger <cg@exept.de>
parents: 11818
diff changeset
   144
or:block1 or:block2
c93f1263c53d +and:and...
Claus Gittinger <cg@exept.de>
parents: 11818
diff changeset
   145
    block1 value ifTrue:[^ true].
c93f1263c53d +and:and...
Claus Gittinger <cg@exept.de>
parents: 11818
diff changeset
   146
    ^ block2 value
c93f1263c53d +and:and...
Claus Gittinger <cg@exept.de>
parents: 11818
diff changeset
   147
!
c93f1263c53d +and:and...
Claus Gittinger <cg@exept.de>
parents: 11818
diff changeset
   148
c93f1263c53d +and:and...
Claus Gittinger <cg@exept.de>
parents: 11818
diff changeset
   149
or:block1 or:block2 or:block3
c93f1263c53d +and:and...
Claus Gittinger <cg@exept.de>
parents: 11818
diff changeset
   150
    block1 value ifTrue:[^ true].
c93f1263c53d +and:and...
Claus Gittinger <cg@exept.de>
parents: 11818
diff changeset
   151
    block2 value ifTrue:[^ true].
c93f1263c53d +and:and...
Claus Gittinger <cg@exept.de>
parents: 11818
diff changeset
   152
    ^ block3 value
c93f1263c53d +and:and...
Claus Gittinger <cg@exept.de>
parents: 11818
diff changeset
   153
!
c93f1263c53d +and:and...
Claus Gittinger <cg@exept.de>
parents: 11818
diff changeset
   154
c93f1263c53d +and:and...
Claus Gittinger <cg@exept.de>
parents: 11818
diff changeset
   155
or:block1 or:block2 or:block3 or:block4
c93f1263c53d +and:and...
Claus Gittinger <cg@exept.de>
parents: 11818
diff changeset
   156
    block1 value ifTrue:[^ true].
c93f1263c53d +and:and...
Claus Gittinger <cg@exept.de>
parents: 11818
diff changeset
   157
    block2 value ifTrue:[^ true].
c93f1263c53d +and:and...
Claus Gittinger <cg@exept.de>
parents: 11818
diff changeset
   158
    block3 value ifTrue:[^ true].
c93f1263c53d +and:and...
Claus Gittinger <cg@exept.de>
parents: 11818
diff changeset
   159
    ^ block4 value
1
a27a279701f8 Initial revision
claus
parents:
diff changeset
   160
! !
a27a279701f8 Initial revision
claus
parents:
diff changeset
   161
10817
f73fcb4b935b +asNumber
Claus Gittinger <cg@exept.de>
parents: 9662
diff changeset
   162
!False methodsFor:'converting'!
f73fcb4b935b +asNumber
Claus Gittinger <cg@exept.de>
parents: 9662
diff changeset
   163
11759
7772f14f36ae +asInteger
Claus Gittinger <cg@exept.de>
parents: 10817
diff changeset
   164
asInteger
7772f14f36ae +asInteger
Claus Gittinger <cg@exept.de>
parents: 10817
diff changeset
   165
    "false->0; true->1"
7772f14f36ae +asInteger
Claus Gittinger <cg@exept.de>
parents: 10817
diff changeset
   166
7772f14f36ae +asInteger
Claus Gittinger <cg@exept.de>
parents: 10817
diff changeset
   167
    ^ 0
7772f14f36ae +asInteger
Claus Gittinger <cg@exept.de>
parents: 10817
diff changeset
   168
!
7772f14f36ae +asInteger
Claus Gittinger <cg@exept.de>
parents: 10817
diff changeset
   169
10817
f73fcb4b935b +asNumber
Claus Gittinger <cg@exept.de>
parents: 9662
diff changeset
   170
asNumber
f73fcb4b935b +asNumber
Claus Gittinger <cg@exept.de>
parents: 9662
diff changeset
   171
    "false->0; true->1"
f73fcb4b935b +asNumber
Claus Gittinger <cg@exept.de>
parents: 9662
diff changeset
   172
f73fcb4b935b +asNumber
Claus Gittinger <cg@exept.de>
parents: 9662
diff changeset
   173
    ^ 0
f73fcb4b935b +asNumber
Claus Gittinger <cg@exept.de>
parents: 9662
diff changeset
   174
! !
f73fcb4b935b +asNumber
Claus Gittinger <cg@exept.de>
parents: 9662
diff changeset
   175
574
5e7cbb66d6c7 testing cvs
Claus Gittinger <cg@exept.de>
parents: 573
diff changeset
   176
!False methodsFor:'logical operations'!
5e7cbb66d6c7 testing cvs
Claus Gittinger <cg@exept.de>
parents: 573
diff changeset
   177
5e7cbb66d6c7 testing cvs
Claus Gittinger <cg@exept.de>
parents: 573
diff changeset
   178
& aBoolean
5e7cbb66d6c7 testing cvs
Claus Gittinger <cg@exept.de>
parents: 573
diff changeset
   179
    "return true, if both the receiver and the argument are true
6906
87afb9964006 comments
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   180
     (since the receiver is false, return false)
87afb9964006 comments
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   181
     Notice: 
87afb9964006 comments
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   182
         as this is a binary message, the argument is always evaluated. 
87afb9964006 comments
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   183
         It might be better to use and:[...], which does not evaluate
87afb9964006 comments
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   184
         the argument if the receiver is already false."
574
5e7cbb66d6c7 testing cvs
Claus Gittinger <cg@exept.de>
parents: 573
diff changeset
   185
5e7cbb66d6c7 testing cvs
Claus Gittinger <cg@exept.de>
parents: 573
diff changeset
   186
    ^ false
5e7cbb66d6c7 testing cvs
Claus Gittinger <cg@exept.de>
parents: 573
diff changeset
   187
!
5e7cbb66d6c7 testing cvs
Claus Gittinger <cg@exept.de>
parents: 573
diff changeset
   188
5e7cbb66d6c7 testing cvs
Claus Gittinger <cg@exept.de>
parents: 573
diff changeset
   189
eqv:aBoolean
5e7cbb66d6c7 testing cvs
Claus Gittinger <cg@exept.de>
parents: 573
diff changeset
   190
    "return true, if the receiver and the argument are the same truth value
5e7cbb66d6c7 testing cvs
Claus Gittinger <cg@exept.de>
parents: 573
diff changeset
   191
     (since the receiver is false, return true if the argument is also false)"
5e7cbb66d6c7 testing cvs
Claus Gittinger <cg@exept.de>
parents: 573
diff changeset
   192
5e7cbb66d6c7 testing cvs
Claus Gittinger <cg@exept.de>
parents: 573
diff changeset
   193
    ^ aBoolean not
5e7cbb66d6c7 testing cvs
Claus Gittinger <cg@exept.de>
parents: 573
diff changeset
   194
!
5e7cbb66d6c7 testing cvs
Claus Gittinger <cg@exept.de>
parents: 573
diff changeset
   195
9000
74a49b889c33 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6906
diff changeset
   196
implies:aBoolean
74a49b889c33 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6906
diff changeset
   197
   "return true if receiver => argument"
74a49b889c33 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6906
diff changeset
   198
74a49b889c33 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6906
diff changeset
   199
    ^ true
74a49b889c33 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6906
diff changeset
   200
!
74a49b889c33 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6906
diff changeset
   201
574
5e7cbb66d6c7 testing cvs
Claus Gittinger <cg@exept.de>
parents: 573
diff changeset
   202
not
5e7cbb66d6c7 testing cvs
Claus Gittinger <cg@exept.de>
parents: 573
diff changeset
   203
    "return true, if the receiver is false, false otherwise
3044
a0bbac91639b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1303
diff changeset
   204
     (since the receiver is false, return true).
a0bbac91639b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1303
diff changeset
   205
     Notice:
a0bbac91639b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1303
diff changeset
   206
	This method is open coded (inlined) by the compiler(s)
a0bbac91639b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1303
diff changeset
   207
	- redefining it may not work as expected."
574
5e7cbb66d6c7 testing cvs
Claus Gittinger <cg@exept.de>
parents: 573
diff changeset
   208
5e7cbb66d6c7 testing cvs
Claus Gittinger <cg@exept.de>
parents: 573
diff changeset
   209
    ^ true
5e7cbb66d6c7 testing cvs
Claus Gittinger <cg@exept.de>
parents: 573
diff changeset
   210
!
5e7cbb66d6c7 testing cvs
Claus Gittinger <cg@exept.de>
parents: 573
diff changeset
   211
5e7cbb66d6c7 testing cvs
Claus Gittinger <cg@exept.de>
parents: 573
diff changeset
   212
xor:aBoolean
5e7cbb66d6c7 testing cvs
Claus Gittinger <cg@exept.de>
parents: 573
diff changeset
   213
    "return true, if the receiver and the argument are different truth values
5e7cbb66d6c7 testing cvs
Claus Gittinger <cg@exept.de>
parents: 573
diff changeset
   214
     (since the receiver is false, return true, if the armument is not false)"
5e7cbb66d6c7 testing cvs
Claus Gittinger <cg@exept.de>
parents: 573
diff changeset
   215
5e7cbb66d6c7 testing cvs
Claus Gittinger <cg@exept.de>
parents: 573
diff changeset
   216
    ^ aBoolean
5e7cbb66d6c7 testing cvs
Claus Gittinger <cg@exept.de>
parents: 573
diff changeset
   217
!
5e7cbb66d6c7 testing cvs
Claus Gittinger <cg@exept.de>
parents: 573
diff changeset
   218
5e7cbb66d6c7 testing cvs
Claus Gittinger <cg@exept.de>
parents: 573
diff changeset
   219
| aBoolean
5e7cbb66d6c7 testing cvs
Claus Gittinger <cg@exept.de>
parents: 573
diff changeset
   220
    "return true, if either the receiver or the argument is true
6906
87afb9964006 comments
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   221
     (since the receiver is false, return the argument).
87afb9964006 comments
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   222
     Notice: 
87afb9964006 comments
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   223
         as this is a binary message, the argument is always evaluated. 
87afb9964006 comments
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   224
         It might be better to use or:[...], which does not evaluate
87afb9964006 comments
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   225
         the argument if the receiver is already true."
574
5e7cbb66d6c7 testing cvs
Claus Gittinger <cg@exept.de>
parents: 573
diff changeset
   226
5e7cbb66d6c7 testing cvs
Claus Gittinger <cg@exept.de>
parents: 573
diff changeset
   227
    ^ aBoolean
5e7cbb66d6c7 testing cvs
Claus Gittinger <cg@exept.de>
parents: 573
diff changeset
   228
! !
5e7cbb66d6c7 testing cvs
Claus Gittinger <cg@exept.de>
parents: 573
diff changeset
   229
5e7cbb66d6c7 testing cvs
Claus Gittinger <cg@exept.de>
parents: 573
diff changeset
   230
!False methodsFor:'printing & storing'!
1
a27a279701f8 Initial revision
claus
parents:
diff changeset
   231
a27a279701f8 Initial revision
claus
parents:
diff changeset
   232
printString
54
06dbdeeed4f9 *** empty log message ***
claus
parents: 38
diff changeset
   233
    "return character sequence representing the receiver"
1
a27a279701f8 Initial revision
claus
parents:
diff changeset
   234
a27a279701f8 Initial revision
claus
parents:
diff changeset
   235
    ^ 'false'
a27a279701f8 Initial revision
claus
parents:
diff changeset
   236
! !
2
claus
parents: 1
diff changeset
   237
692
24ea6761b4a9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 574
diff changeset
   238
!False class methodsFor:'documentation'!
24ea6761b4a9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 574
diff changeset
   239
24ea6761b4a9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 574
diff changeset
   240
version
19112
mawalch
parents: 11917
diff changeset
   241
    ^ '$Header$'
6906
87afb9964006 comments
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   242
! !
19112
mawalch
parents: 11917
diff changeset
   243