- Typed
- Untyped (Kind)
- Cannot be reassigned or redeclared
- Can only hold scalar values
- Can hold large high precision numbers
- Can be created from expression of other constants
- Can be untyped (Kind)
- Constants only exist during compilation time
# cd into the project directory
cd $GOPATH/src/github.com/gophertuts/go-basics/constants/c-vs-go
# compile the program
gcc main.c -o exec
# run the program
./exec
- Constants
- Basic Kind
- Iota
- Identifiers
- Keywords
- Numeric types
- Representability
- Constant expressions
- Introduction to Numeric Constants
- A Tour of Go - Basics
Back to Go Basics