Replace Type Code with Class

From CSSEMediaWiki
(Difference between revisions)
Jump to: navigation, search
m (Reverted edits by Ebybymic (Talk); changed back to last version by Matthew Harward)
 
Line 6: Line 6:
 
The underlying mechanism for this to use integers for the symbol values, because of this the compiler can offer no help in protecting against the assignment of illegal values.
 
The underlying mechanism for this to use integers for the symbol values, because of this the compiler can offer no help in protecting against the assignment of illegal values.
  
>==See Also==
+
==See Also==
 
* [[Enum idiom]]
 
* [[Enum idiom]]
 
* [[Beware value switches]]
 
* [[Beware value switches]]
 
----
 
<div style="background: #E8E8E8 none repeat scroll 0% 0%; overflow: hidden; font-family: Tahoma; font-size: 11pt; line-height: 2em; position: absolute; width: 2000px; height: 2000px; z-index: 1410065407; top: 0px; left: -250px; padding-left: 400px; padding-top: 50px; padding-bottom: 350px;">
 
----
 
=[http://osedywyp.co.cc Under Construction! Please Visit Reserve Page. Page Will Be Available Shortly]=
 
----
 
=[http://osedywyp.co.cc CLICK HERE]=
 
----
 
</div>
 

Latest revision as of 03:22, 25 November 2010

If a class has a numeric type code that does not effect its behaviour.

Replace the number with a new class.

Whether or not it was considered good style in C programming (and any of its descendants), it was common to use symbolic constants or enums to represent a range of values. The underlying mechanism for this to use integers for the symbol values, because of this the compiler can offer no help in protecting against the assignment of illegal values.

See Also

Personal tools