OpenRoberta / openroberta-lab

The programming environment »Open Roberta Lab« by Fraunhofer IAIS enables children and adolescents to program robots. A variety of different programming blocks are provided to program motors and sensors of the robot. Open Roberta Lab uses an approach of graphical programming so that beginners can seamlessly start coding. As a cloud-based application, the platform can be used without prior installation of specific software but runs in any popular browser, independent of operating system and device.
Apache License 2.0
126 stars 121 forks source link

Caliope Simulation: assignment of number to Variable with value null not performed #21

Open kwollw opened 5 years ago

kwollw commented 5 years ago

given the following NEPO program for Calliope: Bildschirmfoto zu 2019-05-12_13-14-31

At the calliope board "Zeige Text x" displays "1" but the simulation displays "undefined".

Without initialialization of "null" the simulation works correctly. Bildschirmfoto zu 2019-05-12_13-17-20

It should be expected that board and simulation show identical behavior.

bjost2s commented 5 years ago

see #74

rbudde commented 5 years ago

see #215

bjost2s commented 5 years ago

still an issue, not solved in #215

bjost2s commented 5 years ago

proposed solution: null may only be used for reference types. Constrains should be checked in blockly and visitor

simonedegiacomi commented 5 years ago

proposed solution: null may only be used for reference types. Constrains should be checked in blockly and visitor

I think that this is a good idea, since it would also fix another bug: If you try to assign 'null' to a number variable using lejos, you get a compilation error: image image

If you want I can work on this issues. The only question I have is if the solution should apply to blockly and visitor of only Caliope (and maybe lejos) or to all the robots.