POV-Ray : Newsgroups : povray.off-topic : Computer language quirks : Re: Computer language quirks Server Time
30 Jul 2024 04:22:24 EDT (-0400)
  Re: Computer language quirks  
From: Zeger Knaepen
Date: 13 May 2011 03:44:28
Message: <4dcce15c$1@news.povray.org>
On 12/05/2011 1:19, Darren New wrote:
> On 5/11/2011 13:27, Warp wrote:
>> C# isn't C++...
>
> I know that. I'm just saying that I was surprised it worked in C++
> because everything I've ever read except the standard implies it
> shouldn't. Every tutorial etc etc etc says "You can't put a value after
> a return in a void function, and you have to put a value after a return
> in a non-void function." So it surprised me this was actually not true
> for C++. So I figured I'd try specifically for C#, because maybe all the
> tutorials for *that* were wrong. :-)

except that your "value" is actually a non-value by itself:

the function "bar" doesn't return anything, so if "foo" returns the 
return-value of "bar", it also doesn't return anything.

I suppose it wouldn't work if "bar" really had a return-value.

cu!
-- 
ZK


Post a reply to this message

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