as "return 1" works fine in the version of JS used by Safari 2. Unfortunately,
I'm not a JS expert (as you can tell) so I've no idea if this is by
design or accident - anyone know?
I assume it's by design. According to the standard (ECMA-262, section 12.9):
An ECMAScript program is considered syntactically incorrect if it contains a
return statement that is not within a FunctionBody.
So there ya go. But if the JS interpreter horks on the string passed
to it from AS, it seems like the AS code should get an indication of
I've never understood JS's approach to exceptions and exception
handling, so ain't going there myself. :p
It's pretty similar to Java's, actually. But the treatment of syntax
errors is somewhat implementation-dependent...
Mark J. Reed <email@hidden>
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription: