Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search

[REBOL] Re: Multi-searches

From: joel:neely:fedex at: 20-Feb-2002 13:32

Hi, Philippe, Philippe Oehler wrote:
> Can you explain me something ? Why (result) is a local variable > and then without the RETURN word, you typed (result) at the end > of the function ? >
The value returned from a function is the value of the last expression evaluated within the function. A single word is, of course, a trivial expression...
> What is the advantage of this ? >
The only reason for using RETURN is to force non-fall-through exit from a function. Putting it at the end of a function is just a wasted extra word evaluation (and typing) AFAIK. -jn-