[Mono-list] hello.cs

Amrit Kohli amrit@wayne.edu
Mon, 11 Oct 2004 14:18:46 -0400


This is a multi-part message in MIME format.

------=_NextPart_000_0027_01C4AF9D.38F604F0
Content-Type: text/plain;
	charset="us-ascii"
Content-Transfer-Encoding: 7bit

Ooops!

 

Thanks for the help folks.  I can't believe I didn't see that. :-)

 

Amrit

 

----

Amrit Kohli

amrit@wayne.edu

 

-----Original Message-----
From: Walter Crosby [mailto:Walt@terabase.com] 
Sent: Monday, October 11, 2004 2:09 PM
To: amrit@wayne.edu
Subject: RE: [Mono-list] hello.cs

 

You are missing the brace right below public -- it points the wrong way.
You have  a CLOSE BRACE (}), where it should be an OPEN BRACE ({)

 

Walt Crosby

Executive VP

Terabase Corporation

10 Elm Street

Danvers, MA 01923

(978) 774-7999 x114

 

 

  _____  

From: mono-list-admin@lists.ximian.com
[mailto:mono-list-admin@lists.ximian.com] On Behalf Of Amrit Kohli
Sent: Monday, October 11, 2004 2:01 PM
To: mono-list@lists.ximian.com
Subject: [Mono-list] hello.cs

Hello,

 

I am new to the mono development platform.  I found an article that
illustrates how to write a simple "hello world" type of program in C#.
However, on my system (a windows 2000 box), the simple program does not
compile.  Here is what the simple program looks like:

 

using System;

 

namespace HelloNameSpace

{

      public class Hello

      }

            static void Main(string[] args)

            {

                  Console.WriteLine("What we think, we become.");

            }

      }

}

 

The compiler gives me the following error message:

 

syntax error, got token `CLOSE_BRACE', expecting OPEN_BRACE COLON

hello.cs(6) error CS8025: Parsing error

Compilation failed: 1 error(s), 0 warnings

 

I am using mono v1.0.2 for windows.

 

What am I missing?

 

Thanks,

 

Amrit

----

Amrit Kohli

amrit@wayne.edu

 


------=_NextPart_000_0027_01C4AF9D.38F604F0
Content-Type: text/html;
	charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>

<head>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Dus-ascii">


<meta name=3DGenerator content=3D"Microsoft Word 10 (filtered)">

<style>
<!--
 /* Font Definitions */
 @font-face
	{font-family:Wingdings;
	panose-1:5 0 0 0 0 0 0 0 0 0;}
@font-face
	{font-family:Tahoma;
	panose-1:2 11 6 4 3 5 4 4 2 4;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
	{margin:0in;
	margin-bottom:.0001pt;
	font-size:10.0pt;
	font-family:"Courier New";}
a:link, span.MsoHyperlink
	{color:blue;
	text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
	{color:purple;
	text-decoration:underline;}
p.Quotation, li.Quotation, div.Quotation
	{margin-top:6.0pt;
	margin-right:.7in;
	margin-bottom:6.0pt;
	margin-left:.7in;
	font-size:10.0pt;
	font-family:"Courier New";}
p.quotation0, li.quotation0, div.quotation0
	{margin-top:6.0pt;
	margin-right:.7in;
	margin-bottom:6.0pt;
	margin-left:.7in;
	font-size:10.0pt;
	font-family:"Courier New";}
span.emailstyle18
	{font-family:"Courier New";
	color:windowtext;
	font-weight:normal;
	font-style:normal;
	text-decoration:none none;}
span.EmailStyle20
	{font-family:"Courier New";
	color:blue;
	font-weight:normal;
	font-style:normal;
	text-decoration:none none;}
@page Section1
	{size:8.5in 11.0in;
	margin:1.0in 1.25in 1.0in 1.25in;}
div.Section1
	{page:Section1;}
-->
</style>

</head>

<body lang=3DEN-US link=3Dblue vlink=3Dpurple>

<div class=3DSection1>

<p class=3DMsoNormal><font size=3D2 color=3Dblue face=3D"Courier =
New"><span
style=3D'font-size:10.0pt;color:blue'>Ooops!</span></font></p>

<p class=3DMsoNormal><font size=3D2 color=3Dblue face=3D"Courier =
New"><span
style=3D'font-size:10.0pt;color:blue'>&nbsp;</span></font></p>

<p class=3DMsoNormal><font size=3D2 color=3Dblue face=3D"Courier =
New"><span
style=3D'font-size:10.0pt;color:blue'>Thanks for the help folks.&nbsp; I =
can&#8217;t
believe I didn&#8217;t see that. </span></font><font color=3Dblue =
face=3DWingdings><span
style=3D'font-family:Wingdings;color:blue'>J</span></font></p>

<p class=3DMsoNormal><font size=3D2 color=3Dblue face=3D"Courier =
New"><span
style=3D'font-size:10.0pt;color:blue'>&nbsp;</span></font></p>

<p class=3DMsoNormal><font size=3D2 color=3Dblue face=3D"Courier =
New"><span
style=3D'font-size:10.0pt;color:blue'>Amrit</span></font></p>

<p class=3DMsoNormal><font size=3D2 color=3Dblue face=3D"Courier =
New"><span
style=3D'font-size:10.0pt;color:blue'>&nbsp;</span></font></p>

<div>

<p class=3DMsoNormal><font size=3D2 color=3Dblue face=3D"Courier =
New"><span
style=3D'font-size:10.0pt;color:blue'>----</span></font></p>

<p class=3DMsoNormal><font size=3D2 color=3Dblue face=3D"Courier =
New"><span
style=3D'font-size:10.0pt;color:blue'>Amrit Kohli</span></font></p>

<p class=3DMsoNormal><font size=3D2 color=3Dblue face=3D"Courier =
New"><span
style=3D'font-size:10.0pt;color:blue'>amrit@wayne.edu</span></font></p>

</div>

<p class=3DMsoNormal><font size=3D2 color=3Dblue face=3D"Courier =
New"><span
style=3D'font-size:10.0pt;color:blue'>&nbsp;</span></font></p>

<p class=3DMsoNormal style=3D'margin-left:.5in'><font size=3D2 =
face=3DTahoma><span
style=3D'font-size:10.0pt;font-family:Tahoma'>-----Original =
Message-----<br>
<b><span style=3D'font-weight:bold'>From:</span></b> Walter Crosby
[mailto:Walt@terabase.com] <br>
<b><span style=3D'font-weight:bold'>Sent:</span></b> </span></font><font =
face=3DTahoma><span style=3D'font-family:Tahoma'>Monday, October 11, =
2004</span></font><font
face=3DTahoma><span style=3D'font-family:Tahoma'> </span></font><font
 face=3DTahoma><span style=3D'font-family:Tahoma'>2:09 =
PM</span></font><font
face=3DTahoma><span style=3D'font-family:Tahoma'><br>
<b><span style=3D'font-weight:bold'>To:</span></b> amrit@wayne.edu<br>
<b><span style=3D'font-weight:bold'>Subject:</span></b> RE: [Mono-list] =
hello.cs</span></font></p>

<p class=3DMsoNormal style=3D'margin-left:.5in'><font size=3D2 =
face=3D"Courier New"><span
style=3D'font-size:10.0pt'>&nbsp;</span></font></p>

<p class=3DMsoNormal style=3D'margin-left:.5in'><font size=3D2 =
color=3Dblue face=3DArial><span
style=3D'font-size:10.0pt;font-family:Arial;color:blue'>You are missing =
the brace
right below public -- it points the wrong way.&nbsp; You have&nbsp; a =
CLOSE
BRACE (}), where it should be an OPEN BRACE ({)</span></font></p>

<div>

<p class=3DMsoNormal style=3D'margin-left:.5in'><font size=3D3 =
face=3D"Times New Roman"><span
style=3D'font-size:12.0pt;font-family:"Times New =
Roman"'>&nbsp;</span></font></p>

</div>

<p class=3DMsoNormal style=3D'margin-left:.5in'><font size=3D2 =
face=3DArial><span
style=3D'font-size:10.0pt;font-family:Arial'>Walt =
Crosby</span></font></p>

<p class=3DMsoNormal style=3D'margin-left:.5in'><font size=3D2 =
face=3DArial><span
style=3D'font-size:10.0pt;font-family:Arial'>Executive =
VP</span></font></p>

<p class=3DMsoNormal style=3D'margin-left:.5in'><font size=3D2 =
face=3DArial><span
style=3D'font-size:10.0pt;font-family:Arial'>Terabase =
Corporation</span></font></p>

<p class=3DMsoNormal style=3D'margin-left:.5in'><font size=3D2 =
face=3DArial><span
  style=3D'font-size:10.0pt;font-family:Arial'>10 Elm =
Street</span></font></p>

<p class=3DMsoNormal style=3D'margin-left:.5in'><font size=3D2 =
face=3DArial><span
  =
style=3D'font-size:10.0pt;font-family:Arial'>Danvers</span></font><font
 face=3DArial><span style=3D'font-family:Arial'>, </span></font><font =
face=3DArial><span
  style=3D'font-family:Arial'>MA</span></font><font face=3DArial><span
 style=3D'font-family:Arial'> </span></font><font face=3DArial><span
  style=3D'font-family:Arial'>01923</span></font></p>

<p class=3DMsoNormal style=3D'margin-left:.5in'><font size=3D2 =
face=3DArial><span
style=3D'font-size:10.0pt;font-family:Arial'>(978) 774-7999 =
x114</span></font></p>

<div>

<p class=3DMsoNormal style=3D'margin-left:.5in'><font size=3D3 =
face=3D"Times New Roman"><span
style=3D'font-size:12.0pt;font-family:"Times New =
Roman"'>&nbsp;</span></font></p>

</div>

<p class=3DMsoNormal style=3D'margin-left:.5in'><font size=3D3 =
face=3D"Times New Roman"><span
style=3D'font-size:12.0pt;font-family:"Times New =
Roman"'>&nbsp;</span></font></p>

<div class=3DMsoNormal align=3Dcenter =
style=3D'margin-left:.5in;text-align:center'><font
size=3D3 face=3D"Times New Roman"><span =
style=3D'font-size:12.0pt;font-family:"Times New Roman"'>

<hr size=3D2 width=3D"100%" align=3Dcenter>

</span></font></div>

<p class=3DMsoNormal =
style=3D'margin-right:0in;margin-bottom:12.0pt;margin-left:
.5in'><b><font size=3D2 face=3DTahoma><span =
style=3D'font-size:10.0pt;font-family:
Tahoma;font-weight:bold'>From:</span></font></b><font =
face=3DTahoma><span
style=3D'font-family:Tahoma'> mono-list-admin@lists.ximian.com
[mailto:mono-list-admin@lists.ximian.com] <b><span =
style=3D'font-weight:bold'>On
Behalf Of </span></b>Amrit Kohli<br>
<b><span style=3D'font-weight:bold'>Sent:</span></b> </span></font><font =
face=3DTahoma><span style=3D'font-family:Tahoma'>Monday, October 11, =
2004</span></font><font
face=3DTahoma><span style=3D'font-family:Tahoma'> </span></font><font
 face=3DTahoma><span style=3D'font-family:Tahoma'>2:01 =
PM</span></font><font
face=3DTahoma><span style=3D'font-family:Tahoma'><br>
<b><span style=3D'font-weight:bold'>To:</span></b> =
mono-list@lists.ximian.com<br>
<b><span style=3D'font-weight:bold'>Subject:</span></b> [Mono-list] =
hello.cs</span></font></p>

<p class=3DMsoNormal style=3D'margin-left:.5in'><font size=3D2 =
face=3D"Courier New"><span
style=3D'font-size:10.0pt'>Hello,</span></font></p>

<p class=3DMsoNormal style=3D'margin-left:.5in'><font size=3D2 =
face=3D"Courier New"><span
style=3D'font-size:10.0pt'>&nbsp;</span></font></p>

<p class=3DMsoNormal style=3D'margin-left:.5in'><font size=3D2 =
face=3D"Courier New"><span
style=3D'font-size:10.0pt'>I am new to the mono development =
platform.&nbsp; I
found an article that illustrates how to write a simple &#8220;hello
world&#8221; type of program in C#.&nbsp; However, on my system (a =
windows 2000
box), the simple program does not compile.&nbsp; Here is what the simple
program looks like:</span></font></p>

<p class=3DMsoNormal style=3D'margin-left:.5in'><font size=3D2 =
face=3D"Courier New"><span
style=3D'font-size:10.0pt'>&nbsp;</span></font></p>

<p class=3DMsoNormal style=3D'margin-left:.5in'><font size=3D2 =
face=3D"Courier New"><span
style=3D'font-size:10.0pt'>using System;</span></font></p>

<p class=3DMsoNormal style=3D'margin-left:.5in'><font size=3D2 =
face=3D"Courier New"><span
style=3D'font-size:10.0pt'>&nbsp;</span></font></p>

<p class=3DMsoNormal style=3D'margin-left:.5in'><font size=3D2 =
face=3D"Courier New"><span
style=3D'font-size:10.0pt'>namespace HelloNameSpace</span></font></p>

<p class=3DMsoNormal style=3D'margin-left:.5in'><font size=3D2 =
face=3D"Courier New"><span
style=3D'font-size:10.0pt'>{</span></font></p>

<p class=3DMsoNormal style=3D'margin-left:.5in'><font size=3D2 =
face=3D"Courier New"><span
style=3D'font-size:10.0pt'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; public class =
Hello</span></font></p>

<p class=3DMsoNormal style=3D'margin-left:.5in'><font size=3D2 =
face=3D"Courier New"><span
style=3D'font-size:10.0pt'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
}</span></font></p>

<p class=3DMsoNormal style=3D'margin-left:.5in'><font size=3D2 =
face=3D"Courier New"><span
style=3D'font-size:10.0pt'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;
static void </span></font>Main(string[] args)</p>

<p class=3DMsoNormal style=3D'margin-left:.5in'><font size=3D2 =
face=3D"Courier New"><span
style=3D'font-size:10.0pt'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;
{</span></font></p>

<p class=3DMsoNormal style=3D'margin-left:.5in'><font size=3D2 =
face=3D"Courier New"><span
style=3D'font-size:10.0pt'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
Console.WriteLine(&quot;What we think, we =
become.&quot;);</span></font></p>

<p class=3DMsoNormal style=3D'margin-left:.5in'><font size=3D2 =
face=3D"Courier New"><span
style=3D'font-size:10.0pt'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;
}</span></font></p>

<p class=3DMsoNormal style=3D'margin-left:.5in'><font size=3D2 =
face=3D"Courier New"><span
style=3D'font-size:10.0pt'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
}</span></font></p>

<p class=3DMsoNormal style=3D'margin-left:.5in'><font size=3D2 =
face=3D"Courier New"><span
style=3D'font-size:10.0pt'>}</span></font></p>

<p class=3DMsoNormal style=3D'margin-left:.5in'><font size=3D2 =
face=3D"Courier New"><span
style=3D'font-size:10.0pt'>&nbsp;</span></font></p>

<p class=3DMsoNormal style=3D'margin-left:.5in'><font size=3D2 =
face=3D"Courier New"><span
style=3D'font-size:10.0pt'>The compiler gives me the following error =
message:</span></font></p>

<p class=3DMsoNormal style=3D'margin-left:.5in'><font size=3D2 =
face=3D"Courier New"><span
style=3D'font-size:10.0pt'>&nbsp;</span></font></p>

<p class=3DMsoNormal style=3D'margin-left:.5in'><font size=3D2 =
face=3D"Courier New"><span
style=3D'font-size:10.0pt'>syntax error, got token `CLOSE_BRACE', =
expecting
OPEN_BRACE COLON</span></font></p>

<p class=3DMsoNormal style=3D'margin-left:.5in'><font size=3D2 =
face=3D"Courier New"><span
style=3D'font-size:10.0pt'>hello.cs(6) error CS8025: Parsing =
error</span></font></p>

<p class=3DMsoNormal style=3D'margin-left:.5in'><font size=3D2 =
face=3D"Courier New"><span
style=3D'font-size:10.0pt'>Compilation failed: 1 error(s), 0 =
warnings</span></font></p>

<p class=3DMsoNormal style=3D'margin-left:.5in'><font size=3D2 =
face=3D"Courier New"><span
style=3D'font-size:10.0pt'>&nbsp;</span></font></p>

<p class=3DMsoNormal style=3D'margin-left:.5in'><font size=3D2 =
face=3D"Courier New"><span
style=3D'font-size:10.0pt'>I am using mono v1.0.2 for =
windows.</span></font></p>

<p class=3DMsoNormal style=3D'margin-left:.5in'><font size=3D2 =
face=3D"Courier New"><span
style=3D'font-size:10.0pt'>&nbsp;</span></font></p>

<p class=3DMsoNormal style=3D'margin-left:.5in'><font size=3D2 =
face=3D"Courier New"><span
style=3D'font-size:10.0pt'>What am I missing?</span></font></p>

<p class=3DMsoNormal style=3D'margin-left:.5in'><font size=3D2 =
face=3D"Courier New"><span
style=3D'font-size:10.0pt'>&nbsp;</span></font></p>

<p class=3DMsoNormal style=3D'margin-left:.5in'><font size=3D2 =
face=3D"Courier New"><span
style=3D'font-size:10.0pt'>Thanks,</span></font></p>

<p class=3DMsoNormal style=3D'margin-left:.5in'><font size=3D2 =
face=3D"Courier New"><span
style=3D'font-size:10.0pt'>&nbsp;</span></font></p>

<p class=3DMsoNormal style=3D'margin-left:.5in'><font size=3D2 =
face=3D"Courier New"><span
style=3D'font-size:10.0pt'>Amrit</span></font></p>

<p class=3DMsoNormal style=3D'margin-left:.5in'><font size=3D2 =
face=3D"Courier New"><span
style=3D'font-size:10.0pt'>----</span></font></p>

<p class=3DMsoNormal style=3D'margin-left:.5in'><font size=3D2 =
face=3D"Courier New"><span
style=3D'font-size:10.0pt'>Amrit Kohli</span></font></p>

<p class=3DMsoNormal style=3D'margin-left:.5in'><font size=3D2 =
face=3D"Courier New"><span
style=3D'font-size:10.0pt'>amrit@wayne.edu</span></font></p>

<p class=3DMsoNormal style=3D'margin-left:.5in'><font size=3D2 =
face=3D"Courier New"><span
style=3D'font-size:10.0pt'>&nbsp;</span></font></p>

</div>

</body>

</html>

------=_NextPart_000_0027_01C4AF9D.38F604F0--