Help with WHILE LOOP

Hi,
I tried to build a while loop according to picture below.
I looked into this forum, the manual, but didn’t succeed.
Not urgent though, just bothering,
kind regards,
matthias

Code below is in:

image
image

It should be
untitled script pic
You need the call block

Oh THANKS!! It works. I dont understand now WHY it works and its late and I need to sleep. But I am sure I'll understand tomorrow, THANKS !

image|418x178

You could also do

Repeat until <not <(condition)>>{
Run (blocks)
}

Because you declared it as a procedure type, the value of the variable Condition is of type Predicate (a function that reports true/false when called), not of type Boolean (true or false). You have to call the predicate to get the Boolean that IF wants.

Thank you all so much for you support and valuable hints. This makes this forum really worth using. It took me a bit to understand as I didnt do that much LISP/SICP in the early days when I was young..
I changed the code and did a "Understand the While - Loop in 4 steps" and hope it helps others to understand faster than me.

I am likely coming to California in August :slight_smile: :smiley:

Come a few days earlier for Snap!Con, Jul 29-Aug 2.