comp.lang.ada
 help / color / mirror / Atom feed
From: Carsten Freining <freining@informatik.uni-jena.de>
Subject: Re: Type Conversion in an Assignment Statement
Date: Tue, 19 Jun 2001 07:41:52 +0200
Date: 2001-06-19T05:40:06+00:00	[thread overview]
Message-ID: <3B2EE620.6BD7E657@informatik.uni-jena.de> (raw)
In-Reply-To: wcc3d8xtuth.fsf@world.std.com

Thanks for your Answer.

First of all I wouldn't write such a Program in real. This Programmpart was
part of an Exercise I had to create for an Ada starter Course. Since the
moment I found out it wouldn't raise an esception as I thought I had to proof
it with the Ada LRM, since giving out an Exercise where the Compiler might be
buggy is dangerous. It would have been a great point for an excersise now,
that it has been proofen (with the Chapters I quoted in the first message). I
wasn't just sure if this is the proper proof or if I have to look further
things up.

> I'm too lazy to quote chapter and verse here.  If you really want to
> understand the RM wording, remember that the name in a type_declaration
> is the name of a subtype (the "first subtype").  A type_declaration
> also creates a type, but types in Ada do not have names.  Integer and
> IntegerSubType are both subtypes (of the same underlying type).  This
> terminology is admittedly a bit confusing, so most people are happy to
> say "the type Integer", when strictly speaking they really mean "the
> type of subtype Integer".

Yes, that is from the Rational, where this has been made clear. It is
sometimes a little confusing, but I will have to get used to it.

> P.S. You ought to use the generally accepted Ada style, and call it
> Integer_Access_Type, rather than IntegerAccessType.

That is something, where Professor Winkler has another opinion. Talkng about
a Program, the 'Underscore' is a problem. Telling somebody that Integer
'Underscore' Access 'Underscore' Type is more confusing. So he set the rule,
that the Names in the program should be without the 'underscore'. It makes
the Program a little less readable, but better 'talkable' what is for
Exercises or courses a little better to work with.
The Style is something intern, there is not the one perfect Style and well we
chose the Style without an 'underscore'. I am aware that usually if everybody
knows that the Words in an identifier are separated by an 'underscore' you
can stil talk about it and the other person will know where the 'underscore'
belongs in the identifier, but this is a departement of Programminglanguage
and Compiler, so we work with many different languages like Java, Modula3,
Pascal, C++, C, Fortran. For the course Programming languages you have to
show the differences with as many PS as possible.

Thanks again for your answer, it helped to make sure that the found Chapters
are the proof of my problem.

Carsten Freining.

--
----------------------------------------------------------------------------
Carsten Freining

e-Mail:         freining@informatik.uni-jena.de
Tel.            03641 9 46344
Adresse:        Friedrich-Schiller-Universit�t Jena
                Fakult�t f�r Mathematik & Informatik
                Institut f�r Informatik
                Lehrstuhl f�r Programmiersprachen und Compiler
                D-07740 Jena, Germany

----------------------------------------------------------------------------





  reply	other threads:[~2001-06-19  5:41 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-06-18  8:15 Type Conversion in an Assignment Statement Carsten Freining
2001-06-18  9:27 ` [comp.lang.ada] " David C. Hoos, Sr.
2001-06-18 10:18   ` Carsten Freining
2001-06-18 10:18   ` Carsten Freining
2001-06-18 13:28 ` Ted Dennison
2001-06-19  5:23   ` Carsten Freining
2001-06-18 20:08 ` Robert A Duff
2001-06-19  5:41   ` Carsten Freining [this message]
2001-06-19 12:35     ` Underscore Usage (was: Type Conversion in an Assignment Statement) Wilhelm Spickermann
replies disabled

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