Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
G
golang
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
go
golang
Commits
f8ba0f45
Commit
f8ba0f45
authored
Mar 13, 2009
by
Russ Cox
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mem.html: nit
go_spec.html: document const type propagation R=ken OCL=26223 CL=26225
parent
8f194bf5
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
3 deletions
+2
-3
go_spec.html
doc/go_spec.html
+2
-3
No files found.
doc/go_spec.html
View file @
f8ba0f45
...
...
@@ -1441,7 +1441,7 @@ right.
<pre
class=
"grammar"
>
ConstDecl = "const" ( ConstSpec | "(" [ ConstSpecList ] ")" ) .
ConstSpecList = ConstSpec { ";" ConstSpec } [ ";" ] .
ConstSpec = IdentifierList [
CompleteType ] [
"=" ExpressionList ] .
ConstSpec = IdentifierList [
[ CompleteType ]
"=" ExpressionList ] .
IdentifierList = identifier { "," identifier } .
ExpressionList = Expression { "," Expression } .
...
...
@@ -1473,8 +1473,7 @@ const u, v float = 0, 3 // u = 0.0, v = 3.0
Within a parenthesized
<code>
const
</code>
declaration list the
expression list may be omitted from any but the first declaration.
Such an empty list is equivalent to the textual substitution of the
first preceding non-empty expression list.
(TODO: Substitute type from that declaration too?)
first preceding non-empty expression list, and its type if any.
Omitting the list of expressions is therefore equivalent to
repeating the previous list. The number of identifiers must be equal
to the number of expressions in the previous list.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment