comp.lang.ada
 help / color / mirror / Atom feed
* Synatx error for Hello World Ada program in the web, or did Ada changed?
@ 2009-12-22 23:16 Nasser M. Abbasi
  2009-12-23  0:16 ` Anh Vo
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Nasser M. Abbasi @ 2009-12-22 23:16 UTC (permalink / raw)


I was just testing my GPS installation from the latest GPL 2009 edition 
downloaded from Ada libre web site.

So I just copied this hello world ada program shown here:

http://www.engin.umd.umich.edu/CIS/course.des/cis400/ada/hworld.html

Here it is:

with Text_To; use Text_To
  procedure hello is
    begin
    put("Hello World");
 end hello


Funny thing is that, I got 2 syntax errors.  (but GPS is working!)

";" is missing from the end of the first line and the end of the last line.

Is this just an oversight on the above web page, or did Ada may be changed 
from the version which was used for the above code? I assume GPL 2009 uses 
Ada 2005, and may be the above code was for Ada 83 or Ada 95 and things 
changed?

Or may be this is a GNAT only thing?

I doubt it?

--Nasser






^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Synatx error for Hello World Ada program in the web, or did Ada changed?
  2009-12-22 23:16 Synatx error for Hello World Ada program in the web, or did Ada changed? Nasser M. Abbasi
@ 2009-12-23  0:16 ` Anh Vo
  2009-12-23  0:18 ` (see below)
  2009-12-23  1:31 ` Adam Beneschan
  2 siblings, 0 replies; 5+ messages in thread
From: Anh Vo @ 2009-12-23  0:16 UTC (permalink / raw)


On Dec 22, 3:16 pm, "Nasser M. Abbasi" <n...@12000.org> wrote:
> I was just testing my GPS installation from the latest GPL 2009 edition
> downloaded from Ada libre web site.
>
> So I just copied this hello world ada program shown here:
>
> http://www.engin.umd.umich.edu/CIS/course.des/cis400/ada/hworld.html
>
> Here it is:
>
> with Text_To; use Text_To
>   procedure hello is
>     begin
>     put("Hello World");
>  end hello
>
> Funny thing is that, I got 2 syntax errors.  (but GPS is working!)
>
> ";" is missing from the end of the first line and the end of the last line.
>
> Is this just an oversight on the above web page, or did Ada may be changed
> from the version which was used for the above code? I assume GPL 2009 uses
> Ada 2005, and may be the above code was for Ada 83 or Ada 95 and things
> changed?
>
> Or may be this is a GNAT only thing?
>
> I doubt it?

It is clearly an oversight on the above web page.

Anh Vo




^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Synatx error for Hello World Ada program in the web, or did Ada changed?
  2009-12-22 23:16 Synatx error for Hello World Ada program in the web, or did Ada changed? Nasser M. Abbasi
  2009-12-23  0:16 ` Anh Vo
@ 2009-12-23  0:18 ` (see below)
  2009-12-23  1:31 ` Adam Beneschan
  2 siblings, 0 replies; 5+ messages in thread
From: (see below) @ 2009-12-23  0:18 UTC (permalink / raw)


On 22/12/2009 23:16, in article KrcYm.81441$Zu5.43665@newsfe24.iad, "Nasser
M. Abbasi" <nma@12000.org> wrote:

> I was just testing my GPS installation from the latest GPL 2009 edition
> downloaded from Ada libre web site.
> 
> So I just copied this hello world ada program shown here:
> 
> http://www.engin.umd.umich.edu/CIS/course.des/cis400/ada/hworld.html
> 
> Here it is:
> 
> with Text_To; use Text_To
>   procedure hello is
>     begin
>     put("Hello World");
>  end hello
> 
> 
> Funny thing is that, I got 2 syntax errors.  (but GPS is working!)

So is the compiler!

> 
> ";" is missing from the end of the first line and the end of the last line.

The code is wrong, and it's not just a matter of missing semicolons.
The rest of the code on that website is almost as bad.

If you want to learn the rudiments of Ada from a website, look at:

   <http://en.wikibooks.org/w/index.php?title=Programming:Ada>

-- 
Bill Findlay
<surname><forename> chez blueyonder.co.uk





^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Synatx error for Hello World Ada program in the web, or did Ada changed?
  2009-12-22 23:16 Synatx error for Hello World Ada program in the web, or did Ada changed? Nasser M. Abbasi
  2009-12-23  0:16 ` Anh Vo
  2009-12-23  0:18 ` (see below)
@ 2009-12-23  1:31 ` Adam Beneschan
  2009-12-23 10:17   ` Hibou57 (Yannick Duchêne)
  2 siblings, 1 reply; 5+ messages in thread
From: Adam Beneschan @ 2009-12-23  1:31 UTC (permalink / raw)


On Dec 22, 3:16 pm, "Nasser M. Abbasi" <n...@12000.org> wrote:
> I was just testing my GPS installation from the latest GPL 2009 edition
> downloaded from Ada libre web site.
>
> So I just copied this hello world ada program shown here:
>
> http://www.engin.umd.umich.edu/CIS/course.des/cis400/ada/hworld.html
>
> Here it is:
>
> with Text_To; use Text_To
>   procedure hello is
>     begin
>     put("Hello World");
>  end hello

Good grief.  What is Text_To?  It looks as though this code was
generated by running some old faded printout through a scanner right
after someone spilled a packet of Sweet-N-Low on the glass, or
something like that.  Shame on them for such an appalling level of
sloppiness.  Well, one other university to add to the list of places
I'm not going to send my kids...

                                      -- Adam



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Synatx error for Hello World Ada program in the web, or did Ada changed?
  2009-12-23  1:31 ` Adam Beneschan
@ 2009-12-23 10:17   ` Hibou57 (Yannick Duchêne)
  0 siblings, 0 replies; 5+ messages in thread
From: Hibou57 (Yannick Duchêne) @ 2009-12-23 10:17 UTC (permalink / raw)


On 23 déc, 02:31, Adam Beneschan <a...@irvine.com> wrote:
> Good grief.  What is Text_To?  It looks as though this code was
> generated by running some old faded printout through a scanner right
> after someone spilled a packet of Sweet-N-Low on the glass, or
> something like that.  Shame on them for such an appalling level of
> sloppiness.  Well, one other university to add to the list of places
> I'm not going to send my kids...
>
>                                       -- Adam

And did you try to download the archive ? It is funny too, their zip
archive is a text file with a zip extension. BTW, it contains the same
errors (this was what I wanted to check).



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2009-12-23 10:17 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-12-22 23:16 Synatx error for Hello World Ada program in the web, or did Ada changed? Nasser M. Abbasi
2009-12-23  0:16 ` Anh Vo
2009-12-23  0:18 ` (see below)
2009-12-23  1:31 ` Adam Beneschan
2009-12-23 10:17   ` Hibou57 (Yannick Duchêne)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox