Thursday, 20 August 2015

Basic Go: Constant

Constants

Constants are declared like variables, but with the const keyword.
Constants can be character, string, boolean, or numeric values.
Constants cannot be declared using the := syntax.


Numeric Constants

Numeric constants are high-precision values.
An untyped constant takes the type needed by its context.
Try printing needInt(Big) too.


Do comment, if it worked/Not worked for you.

No comments:

Post a Comment