openroberta-lab icon indicating copy to clipboard operation
openroberta-lab copied to clipboard

play tone for edison generates invalid code, if the frequency is no number constant

Open rbudde opened this issue 3 years ago • 1 comments

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.

rbudde avatar Jun 15 '21 14:06 rbudde

Duplicate of #540

RaghuvirShirodkar avatar Oct 13 '22 11:10 RaghuvirShirodkar

is already solved

rbudde avatar Apr 26 '23 20:04 rbudde