POV-Ray : Newsgroups : povray.unofficial.patches : Step function : Re: Step function Server Time
15 May 2024 06:32:03 EDT (-0400)
  Re: Step function  
From: Tom Melly
Date: 23 Aug 2000 10:27:47
Message: <39a3df63$1@news.povray.org>
"Chris Huff" <chr### [at] maccom> wrote in message
news: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?

Both - it will return the last evaluated expression or you can use "return
$foo", so

sub foobar{
    $foo = 1;
    return $foo;
}

is the same as

sub foobar{
    $foo = 1;
}


Post a reply to this message

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