Comment about "do" (was clickLine/clickcharchunk)

dunbarx at dunbarx at
Tue May 7 18:18:09 EDT 2013


"...Feels like value could be a way round using do statements in some circumstances."

True. But there are times when "do" is unavoidable, and also times when it is invaluable. I use "do" in cases where an object or variable reference had been "distanced" in some way from its initial appearance. For example, in a locked field with some lines of text in it:

on mouseup
   put random(99) & return  into the clickLine --Works fine. Direct, immediate use of the function
end mouseup

on mouseup
   get the clickLine  --puts some "distance" between the clickLine as a function and as a string in a variable.
   --  put random(99) into it  --does not work, though it seems like it should
   do "put" && random(99) &&  "into" &&  it  --works
end mouseup

There are all kinds of reasons why one would want to put such a function somewhere, and use it later.

This all started in 1987, with such functions as "the foundLine". "Do" has a bad rep. It does not deserve it.


-----Original Message-----
From: Peter Haworth <pete at>
To: How to use LiveCode <use-livecode at>
Sent: Tue, May 7, 2013 3:12 pm
Subject: Re: clickLine/clickcharchunk

Thanks Mike, Andre, and Scott.  Never used value before so you filled
another gap in my LC knowledge.  Feels like value could be a way round
using do statements in some circumstances.

lcSQL Software <>
use-livecode mailing list
use-livecode at
Please visit this url to subscribe, unsubscribe and manage your subscription 


More information about the Use-livecode mailing list