Template:Computer Programming/Variables/2

From Wikibooks, open books for an open world
Jump to navigation Jump to search

The example set the variable X to the integer value of 10. The assignment statement overwrites the contents of the variable and the previous value is lost.

In some languages, before a variable can be used, it will have to be declared, where the declaration specifies the type.