Extension Syntax Options

Moderators: LCMark, LCfraser

Post Reply
netdzynr
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 61
Joined: Sat Apr 08, 2006 6:04 am
Contact:

Extension Syntax Options

Post by netdzynr » Sat Feb 07, 2015 1:23 am

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.

benjibeaumont
Livecode Staff Member
Livecode Staff Member
Posts: 53
Joined: Tue Jun 03, 2008 10:31 am

Re: Extension Syntax Options

Post by benjibeaumont » Mon Feb 09, 2015 10:39 am

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

Code: Select all

if ... then
   # do something
end if
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
Ben Beaumont | Runtime Revolution

Mikey
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 696
Joined: Fri Jun 27, 2008 9:00 pm

Re: Extension Syntax Options

Post by Mikey » Mon Feb 09, 2015 4:52 pm

Second the request: single-line if's would be good, even without a return.

Post Reply

Return to “LiveCode Builder”