Let in 0.44?

Report bugs. Post bug workarounds or fixes

Moderator: MSandro

Post Reply
mguzdial
Posts: 70
Joined: Sep 15th, '15, 11:21

Let in 0.44?

Post by mguzdial » Dec 18th, '15, 15:04

I can't find the Let block in 0.44. I can make one if I type it, and if I type it, the blocks palette turns to the "Variables" tab. But the Let block isn't there.

JohnM
Posts: 379
Joined: Sep 11th, '15, 14:42

Re: Let in 0.44?

Post by JohnM » Dec 28th, '15, 19:16

You cat get a "let" block by clicking on the "New script variable" button in the Variables category. It will prompt you for the name of the variable, and it will ensure that it doesn't match the name of an instance or shared variable.

Although script variables (a.k.a. "local" or "temporary" variables) can make code easier to read, providing a "self-documenting" aspect when variable names are well-chosen and allowing one to break complex expressions into smaller logical chunks, they are not easy to make "discoverable", or even to explain. The approach taken in v044 is to make them more similar to the other two kinds of variables (e.g. created by clicking a button). What do people think?

Post Reply