Search lua-l
This index contains 143,604 documents and
1,774,497 keywords. Last update on
2023-03-08 .
- 1. Unexpected behavior with "not not" (score: 386)
- Author: "Aaron Brown" <aaron-lua@...>
- Date: Thu, 30 Jun 2005 13:08:04 -0400
- Hey everybody, The third and fourth of the following lines don't seem right to me. Do I have a faulty concept in my head? print(not not nil) --> false print(not not nil and true) --> false print(not
- 2. Re: Unexpected behavior with "not not" (score: 386)
- Author: Wim Couwenberg <w.couwenberg@...>
- Date: Thu, 30 Jun 2005 19:47:37 +0200
- That's funny! The reason seems to lie in some tiny optimisations in lcode.c (that's in 5.0.2): The compiler makes the following substitutions if nil, false or true are encountered as *constants*: no
- 3. Re: Unexpected behavior with "not not" (score: 386)
- Author: Rici Lake <lua@...>
- Date: Thu, 30 Jun 2005 23:15:06 -0500
- The compiler makes the following substitutions if nil, false or true are encountered as *constants*: not nil --> true not false --> true not true --> false so "not not nil" is directly emitted as "f
- 4. Re: Unexpected behavior with "not not" (score: 386)
- Author: "Aaron Brown" <aaron-lua@...>
- Date: Fri, 1 Jul 2005 09:07:57 -0400
- I definitely read that sentence in the reference manual multiple times to make sure I wasn't missing something. I can imagine writing a function and wanting it to hide internal information; maybe the
Search by
Namazu v2.0.21