Flexible syntax? Not.

Anything beyond the basics in using the LiveCode language. Share your handlers, functions and magic here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10354
Joined: Wed May 06, 2009 2:28 pm

Flexible syntax? Not.

Post by dunbarx » Mon Nov 30, 2015 6:51 pm

Anybody here realize that "no" is a synonym for "not"?

Code: Select all

set the hilite of btn 2 to no the hilite of btn 2 
Hmmm?

Craig Newman

Dixie
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 1336
Joined: Sun Jul 12, 2009 10:53 am

Re: Flexible syntax? Not.

Post by Dixie » Mon Nov 30, 2015 7:25 pm

Well, that just goes to show how accommodating this 'english like language' is, in that it can also accommodate the vernacular...:-)

bn
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 4174
Joined: Sun Jan 07, 2007 9:12 pm

Re: Flexible syntax? Not.

Post by bn » Mon Nov 30, 2015 7:51 pm

Hi Craig, Dixie

well getting into making LIvecode more attractive to a different audiences
and to make the concept of getProp easily understandable to all audiences here it goes

Two buttons

Script of button 1

Code: Select all

on mouseUp
   set the hilite of btn 2 to the Crap of btn 2
end mouseUp
Script of button 2

Code: Select all

getProp Crap
   return not the hilite of me
end Crap
holy crap that works?

Bernd :)

Dixie
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 1336
Joined: Sun Jul 12, 2009 10:53 am

Re: Flexible syntax? Not.

Post by Dixie » Mon Nov 30, 2015 7:59 pm

Bernd...

:-) :-) :-)

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10354
Joined: Wed May 06, 2009 2:28 pm

Re: Flexible syntax? Not.

Post by dunbarx » Mon Nov 30, 2015 9:10 pm

Bernd.

Wouldn't

Code: Select all

getProp Crap
   answer not the hilite of me
end Crap
be easier to grok? ("grok" is a synonym for "get")

Craig

bn
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 4174
Joined: Sun Jan 07, 2007 9:12 pm

Re: Flexible syntax? Not.

Post by bn » Mon Nov 30, 2015 9:57 pm

Craig.

one would have to try. I would present the version without the modal answer dialog. With this very easy example I would confront anyone learning programming with the fact that in button 1 you need information about the state of the hilite of button 2 and button 2 has a script to give that information to you. Without a modal dialog popping up. Dialogs pop up everywhere but can also distract (in other cases I would use a dialog box e.g. to demonstrate the content of a variable)

Here we have a bare bone flow of information and it should be easy to see the need for this information and one way of getting at it. The "profanity" would catch the interest in this language and advance the understanding of programming.

-- Now the informal part
But if this gets out of hand because parents start complaining about the dirty words* the kids learn in their computer courses, Livecode could still make all expletives reserved words... :) I would like to see that list once it is done :)

Kind regards

Bernd

* (go wash your mouth with soap!!)

Post Reply