microsoft / jacdac

Device and service catalogs for Jacdac.
https://aka.ms/jacdac
Creative Commons Attribution 4.0 International
66 stars 25 forks source link

support for variables in vm #439

Closed pelikhan closed 3 years ago

pelikhan commented 3 years ago

Ability to create/update number/string/boolean variables Query state of variable + change events to reflect values in UI.

tballmsft commented 3 years ago

@pelikhan, @mmoskal: I think that VM variables should be statically typed since we are going to very low resource MCUs.

pelikhan commented 3 years ago

In blockly, it's boolean, number or string, which should be inferred from the first use. I would argue that we don't need to have diferrent numberic types here. We have precise number types in jacdac to minimize packets on the bus, but at the VM level, we should only support a float.

tballmsft commented 3 years ago

OK. I will set type based on first use and then raise an error if there is a dynamic type error.