hedy icon indicating copy to clipboard operation
hedy copied to clipboard

[BUG] Handling of indexed data not always consistent.

Open eremmel opened this issue 2 years ago • 0 comments

Describe the bug One can use index data from a list. In a number of situations you can use that index-expression (e.g. mylist[i]) directly as expression in a more complex situation. But not at all logical places.

The most minimal implementation is to use an index-expression as the only r-value in a assignment expression. This approach will always work (line 6). Some more complex and working examples are seen below in the screen shot. line 7: can be in boolean expression. line 8: can be in print statement

Accepted with questionable results: line 9: treated as unquoted literal string (any way wrong at level 18) line 10: treated as unquoted literal string (?) at least value is not removed. An not excepted expression is 'if mylist[i] in mylist3:'

Paste the Hedy code & level Run this only on lvl 18: image

Add a screenshot (optional)

Expected behavior Allow index expression on all places where a 'input' type is allowed or force only the most simple approach: indexed data needs to be copied to variable first and that variable can be used in expressions.

What machine and browser you were using (optional) N/A Server issue.

eremmel avatar Sep 16 '22 15:09 eremmel