repeat . . . delimit by

Alex Tweedly alex at tweedly.net
Sun Sep 15 20:11:16 EDT 2013


On 16/09/2013 00:44, Richard Gaskin wrote:
> It may also be helpful to remember that lineDel and itemDel are purely 
> arbitrary; that is, they needn't be limited to use only on what we 
> might think of as lines and items.
>
> The only general rule governing them is that the engine will insist 
> that "lines" be a larger chunk type than "items" (you can get item 2 
> of line 1, but you can't get line 2 of item 1) - but beyond that 
> you're free to use whatever delimiters you like.
Well, it only insists on that in a very limited way.

A single item can contain multiple lines.

You cannot say
    put line 1 of item 2 of temp
But you can say
    put line 1 of (item 2 of temp)
and it will happily do so.

put "abc,def" & CR into temp
put "ghi,klm" & CR after temp
put line 1 of  (item 2 of temp)

does indeed output "def"

-- Alex.




More information about the use-livecode mailing list