-
Notifications
You must be signed in to change notification settings - Fork 0
Basic Notes
surfmuggle edited this page Sep 15, 2019
·
1 revision
func lastName(x, y string) (string, string) { return y, x }
func split(sum int) (x, y int) { // named return values x,y
x = sum * 4 / 9
y = sum - x
return // naked: return statement without arguments returns the named return values
}
The keyword var declares a list of variables; the type is last.
var c, python, java bool;
var i, j = 1, 2
var b, c = true, true