Under Review
over 2 years ago

enum with no integer and no error

enum
{
    __1 = "test",
    __2,
    __3 = 0
}

println in console:

test
0
0

but according to doc https://developer.garmin.com/connect-iq/monkey-c/functions/

Note that assigning anything other than an integer will cause an error.

Parents
  • I'm not going to use type checking due to a lot of unproductive modification in source code :-)

    Yes, is connected with type but should  raise error always because keyword enum force to check type of items.

Comment
  • I'm not going to use type checking due to a lot of unproductive modification in source code :-)

    Yes, is connected with type but should  raise error always because keyword enum force to check type of items.

Children
No Data