repeat with each
m.schonewille at economy-x-talk.com
Mon Sep 22 16:16:51 CEST 2014
I should have read it one more time before posting. This should be the
repeat for each word myWord in field "Just One"
put myWord & comma after myNewdata
delete last char of myNewData
sort items of myNewData
put myNewData into field "Just One"
Economy-x-Talk Consulting and Software Engineering
Installer Maker for LiveCode:
Buy my new book "Programming LiveCode for the Real Beginner"
LiveCode on Facebook:
On 9/22/2014 15:28, Paul Foraker wrote:
> On Mon, Sep 22, 2014 at 6:13 AM, Mark Schonewille <
> m.schonewille at economy-x-talk.com> wrote:
>> repeat for each word myWord in field "Just One"
>> put thisWord & comma after myNewdata
>> end repeat
>> sort items of myNewData
>> put char 1 to -2 of myNewData into field "Just One"
> This loop generates a string that (1) starts with an empty item and (2)
> repeats the word "thisWord", deleting the last "d".
> (1) The last item after the loop finishes is empty -- the comma at the end.
> After the sort, however, that comma is at the front of the variable.
> A simple solution would be to replace the last line with
> put char 2 to -1 of myNewData into fld "Just One"
> (2) Instead of "put thisWord", it should be "put myWord". Or, "repeat for
> each word thisWord"
> -- Paul
More information about the use-livecode