AnsweredAssumed Answered

Enum usage

Question asked by Bengt Andersson on Apr 3, 2016
Latest reply on Apr 4, 2016 by Martin Kovar

I am writing a application in C for 5602B and I'm using enum:s in a way that I'm not absolutely  sure is OK.

 

enum

{

     variablesStartAddress = 0,

 

     channelMaskAddress = variablesStartAddress,

 

     dockingParamsAdress = channelMaskAddress + sizeof(tChannelMaskParam)

 

 

 

};

 

For C++ I have found proof that it is OK to use previous elements in the enumeration list to asign a value to an element but not for C. This compiles and builds without problems for me but that doesn't necessarily mean that it is supported. Is this OK in CW10.6??

Outcomes