﻿<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Go Program - The First internet site for Go programming &#187; Syntax Overview</title>
	<atom:link href="http://www.go-program.com/category/basics/syntax-overview/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.go-program.com</link>
	<description>Just another WordPress weblog</description>
	<lastBuildDate>Thu, 19 Nov 2009 11:31:18 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.5</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Go Language Syntax Overview</title>
		<link>http://www.go-program.com/go-programming-language-syntax-overview/</link>
		<comments>http://www.go-program.com/go-programming-language-syntax-overview/#comments</comments>
		<pubDate>Thu, 12 Nov 2009 14:31:22 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Syntax Overview]]></category>

		<guid isPermaLink="false">http://www.go-program.com/?p=8</guid>
		<description><![CDATA[



Syntax overview
Basically C-like with reversed types and declarations, plus keywords to introduce each type of declaration.
Example:
var a int
var b, c *int // note difference from C
var d []int
type S struct { a, b int }




Basic control structures are familiar:
if a == b { return true } else { return false }
for i = 0; i [...]


No related posts.]]></description>
			<content:encoded><![CDATA[<p><script type="text/javascript"><!--
google_ad_client = "pub-9004887195759386";
/* Go programs text ads1 */
google_ad_slot = "3650915252";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></p>
<p align="center"><strong>Syntax overview</strong></p>
<p>Basically C-like with reversed types and declarations, plus keywords to introduce each type of declaration.</p>
<p><span style="text-decoration: underline;">Example:</span></p>
<p>var a int</p>
<p>var b, c *int // note difference from C</p>
<p>var d []int</p>
<p>type S struct { a, b int }</p>
<p><script type="text/javascript"><!--
google_ad_client = "pub-9004887195759386";
/* Goprograms1 */
google_ad_slot = "8587802801";
google_ad_width = 300;
google_ad_height = 250;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></p>
<p>Basic control structures are familiar:</p>
<p>if a == b { return true } else { return false }</p>
<p>for i = 0; i &lt; 10; i++ { &#8230; }</p>
<p>Note: no parentheses, but braces required.</p>
<p align="center"><strong>Semicolons</strong></p>
<p>Semicolons separate (not terminate) statements but:</p>
<p>semis never required at top (global) level</p>
<p>semis not required after closing ) of declaration list</p>
<p>semis not required after } (unless part of expr)</p>
<p>Thus no semis needed in this program:</p>
<p>package main</p>
<p>const three = 3</p>
<p>var i int = three</p>
<p>func main()</p>
<p>{</p>
<p>fmt.Printf(&#8221;%d\n&#8221;, i)</p>
<p>}</p>
<p>However, implicit empty statement allows you to use semicolons the same way as in C if you want.</p>


<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://www.go-program.com/go-programming-language-syntax-overview/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
