04.4.1.md

This commit is contained in:
Unknown
2013-04-21 19:25:28 -04:00
parent 258c50e72a
commit d658c086ca
24 changed files with 447 additions and 18 deletions

View File

@@ -0,0 +1,22 @@
// char.go
package main
import (
"fmt"
)
func main() {
var ch int = '\u0041'
var ch2 int = '\u03B2'
var ch3 int = '\U00101234'
fmt.Printf("%d - %d - %d\n", ch, ch2, ch3)
fmt.Printf("%c - %c - %c\n", ch, ch2, ch3)
fmt.Printf("%X - %X - %X\n", ch, ch2, ch3)
fmt.Printf("%U - %U - %U", ch, ch2, ch3)
}
/* Ouput:
65 - 946 - 1053236
A - β - 􁈴
41 - 3B2 - 101234
U+0041 - U+03B2 - U+101234
*/