# False || not(true)

**URL:** <https://www.ruby-forum.com/t/false-not-true/142243>\
**Category:** Ruby\
**Created:** [July 5, 2008, 3:25am UTC](https://www.ruby-forum.com/t/false-not-true/142243 "2008-07-05T03:25:22Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![SHINDO\_Motoaki](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/b782af/32.png) [@SHINDO\_Motoaki](https://www.ruby-forum.com/u/SHINDO_Motoaki)\
**Post date:** [July 5, 2008, 3:25am UTC](https://www.ruby-forum.com/t/false-not-true/142243/1 "2008-07-05T03:25:22Z")

</div>

Hi\>Volks

This is my 1st post to this ML,  
butâ€¦

I read 'bout a problem: (false || not(true))  
in a place, and made a little considerations.

I give NOW, the source code AsIs,  
with the ‘comments’ in itâ€¦  
ï¼ï¼ï¼ï¼ï¼  
#!/usr/bin/env ruby -Ku

def case1(c)  
if c.nil?

# does nothing

elsif !c # c == false || not true

# does nothing

else  
puts "case1: ", c  
end

# It’s just NO problem, in C-programmer fashion [not fully tested]

end

def case2(c)  
if c.nil?

# does nothing

# c == false || not true if you want it to be TRUE, before that,

#elsif c.class == Boolean or  
#elsif c.class != Char or something, you must ask.

# 1st of all, have WE Classes like Boolean or Char ???

elsif c.class != String # now this line may be wrong questionâ€¦

# does nothing

```
puts "case2: c is no String"

```

elsif !c  
puts "case2: ", c  
end  
end

c = STDIN.getc()

case1(c)  
case2(c)

# Was it just Me? that

# got troubled with needless TRUE

# in evaluating True-False, aString(or aChar) AsIsâ€¦

=======================  
2 bits thinking helps 66.7%

Shindo Motoaki (Motoakira)

# 21, Higashi-Kurayoshi machi Yonago City, Tottori Pref. 683-0815, Japan TEL 81-859-33-7431/81-90-7593-3585 [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

---

<div class="post-metadata">

**Author:** ![SHINDO\_Motoaki](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/b782af/32.png) [@SHINDO\_Motoaki](https://www.ruby-forum.com/u/SHINDO_Motoaki)\
**Post date:** [July 5, 2008, 8:48am UTC](https://www.ruby-forum.com/t/false-not-true/142243/2 "2008-07-05T08:48:10Z")

</div>

Hi,

In message “Re: false || not(true)”  
on Sat, 5 Jul 2008 10:21:29 +0900, SHINDO Motoaki  
[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) writes:

|I read 'bout a problem: (false || not(true))  
|in a place, and made a little considerations.

“||” is an operator that takes “expressions” for both operands, so that  
you should provide parentheses around not, which is a “command”. In  
short, you should write

c == false || (not true)

instead of

c == false || not true

|Shindo Motoaki (Motoakira)  
|  
|21, Higashi-Kurayoshi machi  
|Yonago City, Tottori Pref.

Wow, you lived only 300m away from my parents’ house.

```
          matz.

```

---

<div class="post-metadata">

**Author:** ![SHINDO\_Motoaki](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/b782af/32.png) [@SHINDO\_Motoaki](https://www.ruby-forum.com/u/SHINDO_Motoaki)\
**Post date:** [July 5, 2008, 12:25pm UTC](https://www.ruby-forum.com/t/false-not-true/142243/3 "2008-07-05T12:25:47Z")

</div>

Thank you \>Matz-sanâ€¦

On 2008/07/05, at 15:44, Yukihiro M. wrote:

> which is a “command”.

with it, you mean ‘not’ is not a Function?

[http://www.ruby-lang.org/ja/man/html/\_B1E9BBBBBBD2BCB0.html](http://www.ruby-lang.org/ja/man/html/_B1E9BBBBBBD2BCB0.html)  
seems tell ‘not’ is an Operatorâ€¦  
I’m not sureâ€¦

> In short, you should write
> 
> c == false || (not true)

with the lines, my guess is to do with Priorities among Operatorsâ€¦  
I’m not sureâ€¦(^\_^ã‚ž

> Wow, you lived only 300m away from my parents’ house.

I should take it serious. Then,  
(‘matz’ + (‘motoakira’ - ‘akira’)) evalâ€¦(^\_^ã‚ž

# objectively yoursâ€¦

I’m the One of Sad&Mad.

```
     Shindo Motoakira
<removed_email_address@domain.invalid>

```

=============================
