Skip to content

Latest commit

 

History

History
29 lines (19 loc) · 961 Bytes

types.rst

File metadata and controls

29 lines (19 loc) · 961 Bytes

type

Types

Solidity is a statically typed language, which means that the type of each variable (state and local) needs to be specified. Solidity provides several elementary types which can be combined to form complex types.

In addition, types can interact with each other in expressions containing operators. For a quick reference of the various operators, see order.

The concept of "undefined" or "null" values does not exist in Solidity, but newly declared variables always have a default value<default-value> dependent on its type. To handle any unexpected values, you should use the revert function<assert-and-require> to revert the whole transaction, or return a tuple with a second bool value denoting success.