Didn't want to hijack another thread, so here's a comment:
It appears that an "if..." statement always needs to be closed with "end if" even when "return" appears in the code.
So for example, the Widget Builder flags this as an error:
if mTheme is "ios-8" then return 9
It would be nice if the language parsing would accept the above for more concise code.
Extension Syntax Options
-
- Livecode Staff Member
- Posts: 53
- Joined: Tue Jun 03, 2008 10:31 am
Re: Extension Syntax Options
Hi Netdzynr,
Thanks for your post and making it a new thread. As you say, it's good to discuss each issue separately. At the moment you are correct, the syntax for if/the/else if/else/return is fixed to the
We do intend to extend out what forms of "if" the compiler will accept but for now our focus has been on to core functionality.
Warm regards,
Ben
Thanks for your post and making it a new thread. As you say, it's good to discuss each issue separately. At the moment you are correct, the syntax for if/the/else if/else/return is fixed to the
Code: Select all
if ... then
# do something
end if
Warm regards,
Ben
Ben Beaumont | Runtime Revolution
Re: Extension Syntax Options
Second the request: single-line if's would be good, even without a return.