Skip to content

Commit

Permalink
type alias
Browse files Browse the repository at this point in the history
  • Loading branch information
xhliu committed Apr 24, 2021
1 parent 42d474d commit da3a429
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions docs/syntax.rst
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,15 @@ The ``auto`` keyword specifies that the type of the variable, of basic type, dec
auto a1 = b'36'; // bytes a1 = b'36';
auto a2 = 1 + 5 * 3; // int a2 = 1 + 5 * 3;
Type Aliases
------------
Type aliases create a new name for a type. It does not actually create a new type, it merely creates a new name to refer to that type.

.. code-block:: solidity
type Age = int;
type Coordinate = int[2];
``const`` Variables
===================
Variables declared const cannot be changed once initialized.
Expand Down

0 comments on commit da3a429

Please sign in to comment.