#77 enums as function parameter causes error

compiler
closed-fixed
NXC (53)
5
2010-01-04
2009-12-03
No

It is currently not possible to pass an enum as a parameter to a function. The following code will cause a compile error (main task omitted):

enum tMUXSensor {
msensor_S1_1 = 0,
msensor_S1_2 = 1,
};

void foo(tMUXSensor muxsensor) {
TextOut(0, LCD_LINE1, "foo called");
}

Thanks,
Xander

Discussion

  • John Hansen

    John Hansen - 2010-01-04

    A fix for this defect has been checked into SVN and will be included in the next official release.

     
  • John Hansen

    John Hansen - 2010-01-04
    • status: open --> closed-fixed