Empty Block Error (Gets In The Way)
JonnyMac
Posts: 9,104
When building methods from the outside in, I often do things things like this:
pub pwm(pin, freq, duty) if (freq <= 0) ' clear smart pin else ' configure smart pinWith Spin2, this code throws an error: Block is Empty -- which does not happen in Spin1. This gets in the way of incremental development. Can we go back to what Spin1 does with this code?
Comments
Okay. I will change it back to the way it was.
In python you must include something in each if/elif/else but there is pass which is the equivalent of nothing, just to satisfy the compiler/interpreter that is really what you want.