Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Bytes

  • byte
package main

import (
	"fmt"
	"unsafe"
)

func main() {
	var z byte = 254
	fmt.Println(z)
	z++
	fmt.Println(z)
	z++
	fmt.Println(z)
	z--
	fmt.Println(z)

	fmt.Println(unsafe.Sizeof(z))
}
254
255
0
255
1