POV-Ray : Newsgroups : povray.unofficial.patches : Step function : Re: Step function Server Time
15 May 2024 11:56:45 EDT (-0400)
  Re: Step function  
From: Chris Huff
Date: 23 Aug 2000 09:36:37
Message: <chrishuff-73EA9B.08380023082000@news.povray.org>
In article <slr### [at] fwicom>, ron### [at] povrayorg 
wrote:

> Perl uses the value of the last evaluated expression as the return value.
> Could that work?

It might, I think...does it just return at the end of the function with 
the value of the last expression, or is there an equivalent to the 
"return" statement in C?
It could be useful to have any "orphan" expression force a return with 
the value of that expression if it is reached, that would allow multiple 
exit points. Or maybe that isn't a good idea...I have found it sometimes 
makes cleaner code, but I have also heard it isn't good programming 
style. And constantly checking every expression for the returning 
conditions might slow things down, but maybe a "return" statement could 
be inserted at parse-time so the checking doesn't have to be done at 
run-time...

-- 
Christopher James Huff
Personal: chr### [at] maccom, http://homepage.mac.com/chrishuff/
TAG: chr### [at] tagpovrayorg, http://tag.povray.org/

<><


Post a reply to this message

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