Open pdawyndt opened 6 years ago
define bla {1} "s" #123
Currently:
(non existing {} bla bla )
-> generate variable + warningnote for generating warnings when the wrong inputtype is used:
should say {1}
generate a warning?
I guess your idea was that say {1}
can also be written as say "1"
or as say {"1"}
in line with the fact that Scratch does not make a difference between numbers and strings. In that respect, none of these alternatives should generate warnings.
Only if you can infer a difference between numbers and strings from the block context, I would generate warnings if a number is used where a string is expected or where a string is used where a number is expected. Together with the warnings, I would automatically cast the number into a string if a string is expected (this is always possible) and try to cast the string into a number if a number is expected (this is something that could fail; if it fails, I would issue an error instead of a warning if no sensible block conversion can be done).
I agree. There are more input types then just numbers. I am working on this function to verify the value. (not yet fully tested)
when [some_unknown] key pressed
)