//=== https://golang.org/ref/spec#Passing_arguments_to_..._parameters
* "..." is different from '…'
* The character … (as opposed to the three characters ...) is not a token of the Go language
" ... "
The final parameter in a function signature may have a type prefixed with ... ,
a function with such a parameter is called variadic and may be
invoked with zero or more arguments for that parameter.
func(prefix string, values ...int)
func(a, b int, z float64, opt ...interface{}) (success bool)
'…'
[]T{x1, x2, … xn}
decimal_lit = ( "1" … "9" ) { decimal_digit } .
2015年3月30日 星期一
golang "..." and '…'
訂閱:
張貼留言 (Atom)
沒有留言:
張貼留言