免責聲明

Disclaimer (免責聲明)
繼續閱覽代表您接受以上的免責聲明.
To continue reading means you accept the above disclaimer.

2015年3月30日 星期一

golang "..." and '…'


//=== 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 } .







沒有留言:

張貼留言