John Joyce
8/26/2007 5:26:00 PM
On Aug 26, 2007, at 9:32 AM, Bertram Scharpf wrote:
> Hi,
>
> Am Sonntag, 26. Aug 2007, 10:05:07 +0900 schrieb Wai Tsang:
>> Bertram Scharpf wrote:
>>> Am Sonntag, 26. Aug 2007, 07:00:06 +0900 schrieb William James:
>>>> On Aug 25, 3:05 pm, "Barr, Keith" <keith.b...@lmco.com> wrote:
>>>>
>>>> select( [$stdin], nil, nil, 0.01 ) ? c = $stdin.getc : c = nil
>>> Why `c=´? Why twice?
>>
>> It means if select( [$stdin], nil, nil, 0.01 ) return true,
>> then c = $stdin.getc; otherwise c = nil.
>
> The variable c will not be used and the assignment is
> mentioned twice. Besides that it is questionable whether an
> assignment in a ?: expression will parse how the author
> intended.
>
> That the function will return `true' is just a lie.
>
> Bertram
Bertram, no need for inflamatory statements. Calling something 'just
a lie' implies that the person is maliciously trying to spread false
information. It might be more appropriate to simply say that it is a
mistake and explain why.