Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#77 enums as function parameter causes error

compiler
closed-fixed
John Hansen
NXC (53)
5
2010-01-04
2009-12-03
Xander Soldaat
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