an overcomplicated solution:

Go() [] PUBLIC
{
    s cont = 0,pos = 1,lines = 0
    do {
        set line = $Text(Go+pos)
        set cont = cont + (($LENGTH(line,"{")-1)-($LENGTH(line,"}")-1))
        set lines = lines + 1
        set pos = pos + 1
    } while (cont > 0)
    s x=1
    if (x=1) a=}
    f i=0:1:lines $Text(Go+i),!
    s x=1
    if (x=1) a=}
    if (a=x) {
        b=a
    }
}

Yeah, question is, what will we do now?

In any case, thanks to everyone for sharing your code! It has been fun an educational!

 

Congrats!!

I discovered that I'm no good at multi-tasking (surprise!)... Babysitting and coding is not an ideal combination

 

 

Today I really regret not getting up early...

started at 7:05 and finished first part in 12min, second part in 18min -> would get me a place in top 100...

sad

 

I did not bother doing the jobs parallel. Turn-based did come up with an answer reasonably fast.

But I'm sure it would be interesting to sort out how to execute them in parallel. In any case I'm sure I'll be playing around with $system.Event (didn't know that one)...

Denis,

Are you trying to have one form refreshing its data based on actions on the first form?