POV-Ray : Newsgroups : povray.off-topic : Unexpected : Re: Unexpected Server Time
28 Jul 2024 22:27:50 EDT (-0400)
  Re: Unexpected  
From: clipka
Date: 18 Aug 2013 09:50:12
Message: <5210d114$1@news.povray.org>
Am 18.08.2013 15:23, schrieb Warp:
> clipka <ano### [at] anonymousorg> wrote:
>> Am 18.08.2013 14:27, schrieb Warp:
>>> Orchid Win7 v1 <voi### [at] devnull> wrote:
>>>> But you can phrase that as
>>>
>>>>      return x ? x : -x;
>>>
>>> No, you can't.
>>>
>>> Don't blame others for doing mistakes if you are doing them yourself. ;)
>
>> It's a creative way of writing "return x" though ;-)
>
> Out of curiosity: Does C#, like C/C++, consider a non-boolean value as
> a valid boolean (where a boolean is expected)?

Me I dunno. Though, thinking about it, Microsoft did various things 
right with C#, so I suspect it won't accept non-booleans there.

> I know that there are some languages that don't, but on the other hand.
> C# is kind of in the C family of languages...

So is Java, but even that insists on proper booleans for tests.


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.