how are variables passed from functions?
Mark Wieder
mwieder at ahsoftware.net
Sat Nov 15 12:55:46 EST 2014
Jacque-
Friday, November 14, 2014, 5:46:08 PM, you wrote:
> On 11/14/2014, 5:28 PM, Bob Sneidar wrote:
>> I guess what I am saying is that since test1 did not*explicitly*
>> return anything, the mouseUp handler should put nothing in the
>> message box. However I am discovering that functions*implicitly*
>> return data that the programmer did not tell them to return.
> I'm trying to understand how it follows any known rule of messaging. I
> don't see it yet. To me it looks like a bug.
I've only followed this thread sporadically because it's been a busy
week at work, but I'm quite amused. This is the way ruby works, and if
memory serves, go works the same way. The last statement executed is
the current result. In fact, it's considered bad form in ruby code to
include an explicit return statement at the end of a method. Xtalk has
simply been ahead of its time all along.
Now if LiveCode coders would simply put return statements at the end
of functions where they belong there wouldn't be any confusion.
--
-Mark Wieder
ahsoftware at gmail.com
This communication may be unlawfully collected and stored by the National
Security Agency (NSA) in secret. The parties to this email do not
consent to the retrieving or storing of this communication and any
related metadata, as well as printing, copying, re-transmitting,
disseminating, or otherwise using it. If you believe you have received
this communication in error, please delete it immediately.
More information about the use-livecode
mailing list