Assigning Many Variables via One Block of HSL Code

I believe this is a limitation of using HSL code blocks, even in the HSL powerpoint documentation (see link below), it states that “all NEW variables you create in the HSL code block are only valid within this block”.

It is true since when I declare a new variable in a code block, while it does not show in the Variables and Constants pane, it does show in the trace view. It’s ideal if you want to create temporary variables but, otherwise, you would have to manually set it as @Gareth mentioned.

{
variable NewVar, NewStr;

NewVar = 25;
NewStr = "Hello";

Trace("my new variable:  ",NewVar);

Trace("my new string:  ",NewStr);
}

Screenshot 2024-10-10 at 6.27.16 PM