Jim Ault JimAultWins at
Tue Nov 14 11:02:14 EST 2006

On 11/14/06 7:30 AM, "Mikey" <mikeythek at> wrote:

> Is the parsing code for the script editor available somewhere?  I'm
> betting the answer is "no", but I thought I'd ask.
> The fact that comment double-dash can't terminate a keyword (and that
> "the" is anal-required) is something I would like to address as long
> as I'm playing around.

I always use a space before my comment characters, so I have not discovered
this quirk.  The one quirk I have to watch out for is:

--on mouseup
--   do something useful
--end mouseUp
=> and now the script parser does not ignore the 'on', yet won't run the
script either.  
--o n mouseUp  ##does work
--   do something useful
--e nd mouseUp

This technique does work:

on mouseup
   do something useful
end mouseUp 

>(and that "the" is anal-required)
Now here you are going to run into a significant difficulty.  The xTalk
object model and syntax is based on using 'the' as part of many references.
If this bothers you, then you are probably going to do quite a bit of
wrestling with xTalk coding to either save keystrokes, or make your code
look more concise, or have xTalk look more like another language. I think
most everyone starts off thinking 'why so verbose?'

Hang in there.  Before long, it will just be part of what you do.

You could build your own library of short hand

function numCds
   return the number of cards
end numCds

function numI string, del
   set the itemDel to del
   return the number of items in string
end numI

Jim Ault
Las Vegas

More information about the Use-livecode mailing list