mirror of https://github.com/golang/go.git
parent
250767174b
commit
5009237adb
|
|
@ -532,7 +532,7 @@ Any array may be assigned to an open array variable with the
|
||||||
same element type. Typically, open arrays are used as
|
same element type. Typically, open arrays are used as
|
||||||
formal parameters for functions.
|
formal parameters for functions.
|
||||||
|
|
||||||
ArrayType = { '[' ArrayLength ']' } ElementType.
|
ArrayType = '[' [ ArrayLength ] ']' ElementType .
|
||||||
ArrayLength = Expression .
|
ArrayLength = Expression .
|
||||||
ElementType = Type .
|
ElementType = Type .
|
||||||
|
|
||||||
|
|
@ -687,7 +687,7 @@ Functions can return multiple values simultaneously.
|
||||||
Parameters = '(' [ ParameterList ] ')' .
|
Parameters = '(' [ ParameterList ] ')' .
|
||||||
ParameterList = ParameterSection { ',' ParameterSection } .
|
ParameterList = ParameterSection { ',' ParameterSection } .
|
||||||
ParameterSection = [ IdentifierList ] Type .
|
ParameterSection = [ IdentifierList ] Type .
|
||||||
Result = [ Type ] | '(' ParameterList ')' .
|
Result = Type | '(' ParameterList ')' .
|
||||||
|
|
||||||
// Function types
|
// Function types
|
||||||
func ()
|
func ()
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue