DO command

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

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
DavidBurleigh
Posts: 19
Joined: Sun Apr 05, 2009 9:27 am

DO command

Post by DavidBurleigh » Thu Feb 04, 2010 8:03 am

quick question. I want a field on one of my tabs that will let
clients insert ad hoc code. If I write a custom function
or handler, let's call it 'DoSomething()', and I have some code
like this:

repeat for each line someLine in field "suchandsuch"
put DoSomething(someLine) into SomeValue
answer SomeValue
end repeat

Would this count as 4 lines against the 10 line limit? or does
it add in all the lines in the function or handler also?
thanks, if you can reply to incomex@NOSPAMhotmail.com
directly, thanks.

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Re: DO command

Post by Mark » Sun Mar 07, 2010 10:33 am

DavidBurleigh,

Your script snippet would count as 4 lines, unless the doSomething() function contains another do command. It is not always exactly clear as how many lines a piece of code is actually counted. Sometimes, it appears that you can execute 12 or 13 lines.

Best,

Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

Post Reply

Return to “Talking LiveCode”