Const (computer programming): Difference between revisions

Content deleted Content added
both meanings
m sp fix
Line 8:
b = 4; // not ok
 
Otherwise, variables work exactly like varialbesvariables with non-const type. The exact semantic of ''const'' varies widely. Mostly, the feature refers to that in [[C plus plus programming language|C++]] (not C).
 
The idea of <code>const</code>-ness does not imply that the variable as it is stored in the [[computer]]'s [[computer storage|memory]] is unwriteable. Rather, <code>const</code>-ness is a [[compile-time]] construct that indicates what a programmer ''may'' do, not necessarily what he ''can'' do.