Keith,

There is a good explanation of chunk expressions in the User Guide, starting on 
p. 168.
You get to the User Guide by opening the Resource Center from the toolbar, 
which has a link 
to download the PDF of the User Guide. There is lots of good stuff in there 
that explains the basics.

What is in tRecord? It needs to be the line NUMBER, not the contents of that 
line. 

If tRecords contains:
first line
second line
third line

put comma & "foo" after line 2 of tRecords -- will change tRecords to:
first line
second line,foo
third line

But instead if you put "second line" into tRecord
put comma & "foo" after line tRecord of tRecords -- will fail at runtime
because the variable tRecord doesn't evaluate to a line NUMBER or range of 
numbers.
It compiles OK because tRecord might contain a number at runtime, it can't tell.

Cheer,
.Jerry

> On Mar 16, 2015, at 11:53 AM, Keith Clarke <[email protected]> wrote:
> 
> Weirdly, using this form…
> 
> put comma & tInsert after line tRecord of tRecords
> 
> ... Compiles OK but then fails on run with (Chunk: error in range start 
> expression)


_______________________________________________
use-livecode mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reply via email to