openroberta-lab
openroberta-lab copied to clipboard
play tone for edison generates invalid code, if the frequency is no number constant
write a program playing a tone.
- if the frequency is a constant (e.g. 2000), the code generated contains an expression 8000000/2000, which is evaluated by the compiler. The result fits into a number.
- if the frequency is a variable (e.g. x), the code generated contains an expression 8000000/x, which fails, because 8000 doesn't fit into a number.
Duplicate of #540
is already solved