comp.lang.ada
 help / color / mirror / Atom feed
* Re: generic packages and dispatched operations
       [not found] <96r871$1g5g$1@news.kiev.sovam.com>
@ 2001-02-21  7:17 ` Maxim Reznik
  2001-02-21 15:00   ` Marin David Condic
  0 siblings, 1 reply; 5+ messages in thread
From: Maxim Reznik @ 2001-02-21  7:17 UTC (permalink / raw)


Hey! Please!

Could anybody compile this program on compilers different from GNAT or Aonix?

Could anybody say if this program conform with ada 95 ?

It isn't too long programm, really.
Thank you.

PS. you speak about new release of Ada and say there is only one dialect of Ada.
So is it difficult to answer two such simple questions?



--
Maxim Reznik
email:  <reznikmm@hotmail.com>
ICQ: 18702307






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

* Re: generic packages and dispatched operations
  2001-02-21  7:17 ` generic packages and dispatched operations Maxim Reznik
@ 2001-02-21 15:00   ` Marin David Condic
       [not found]     ` <972rh2$26gk$1@news.kiev.sovam.com>
  0 siblings, 1 reply; 5+ messages in thread
From: Marin David Condic @ 2001-02-21 15:00 UTC (permalink / raw)


You failed to post any code so nobody can check to see if what you are
interested in will compile with a compiler other than GNAT and/or Aonix.
Please post again - maybe we can help.

While Ada does not have any "dialects" allowed within the standard, that
does not mean that you cannot write code that is specific to one compiler.
First, the standard itself allows for no subsets or supersets within the
*standard*, but a compiler is free to implement anything it likes. A
compiler can (and some do - notably GNAT) provide a subset and/or superset
of the language - it just needs some mode in which it compiles the standard
language. (Important to note here is that this is *only* important if you
want your compiler *validated*. If you have no intentions of validating the
compiler, you can do anything you want.)

Also, just because a compiler adheres to the standard and is validated,
doesn't mean that you can't write implementation specific code. Two simple
examples: One is where you write a program that "withs" a package supplied
only by your specific compiler. (Say, for example, a package of math
functions supported by your compiler that are not part of the standard)
Another is where you may write code that takes advantage of allowable
implementation specific data types such as Long_Long_Float - the standard
allows it to exist, but doesn't require it be there for machines on which
this would be difficult to implement.

Hope you find this helpful.

MDC
--
Marin David Condic
Senior Software Engineer
Pace Micro Technology Americas    www.pacemicro.com
Enabling the digital revolution
e-Mail:    marin.condic@pacemicro.com
Web:      http://www.mcondic.com/



"Maxim Reznik" <max1@mbank.com.ua> wrote in message
news:96vq2l$mqg$1@news.kiev.sovam.com...
> Hey! Please!
>
> Could anybody compile this program on compilers different from GNAT or
Aonix?
>
> Could anybody say if this program conform with ada 95 ?
>
> It isn't too long programm, really.
> Thank you.
>
> PS. you speak about new release of Ada and say there is only one dialect
of Ada.
> So is it difficult to answer two such simple questions?
>
>
>
> --
> Maxim Reznik
> email:  <reznikmm@hotmail.com>
> ICQ: 18702307
>
>
>





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

* Re: generic packages and dispatched operations
       [not found]       ` <97gmv4$3cf$1@a1-hrz.uni-duisburg.de>
@ 2001-02-28 13:19         ` Marc A. Criley
  0 siblings, 0 replies; 5+ messages in thread
From: Marc A. Criley @ 2001-02-28 13:19 UTC (permalink / raw)


Georg Bauhaus wrote:

>      4. package CUpper is new Upper(Character);
>         |
>         >>> warning: instantiation of "upper" may raise Program_Error
>         >>> warning: missing pragma Elaborate_All for "upper"
> 
> Don't rely on what I say, but cupper.ads looks like
> a package spec (at least that is what gnatchop says)
> but is just an instantiation, "new Upper(Character)".
> Checking with the syntax given in RM 7.1(3) I'm missing
> the "end", e.g..
> 
> So, with warnings on, you get more than a silent
> compilation and some hints.   Still I'm not sure
> wether the code is correct.  More votes?
> 

No need to vote, here's the facts:  A stand-alone instantiation is a
perfectly legal Ada unit.  For example, here's the entirety of the
predefined Ada.Integer_Text_IO unit:

---------------------------------------------
with Ada.Text_IO;

package Ada.Integer_Text_IO is
  new Ada.Text_IO.Integer_IO (Integer);
---------------------------------------------

As a matter of fact, even a "package renaming" is a legal unit--here's
Text_IO:

---------------------------------------------
with Ada.Text_IO;

package Text_IO renames Ada.Text_IO;
---------------------------------------------


Marc A. Criley
Senior Staff Engineer
Quadrus Corporation
www.quadruscorp.com



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

* Re: generic packages and dispatched operations
       [not found]     ` <972rh2$26gk$1@news.kiev.sovam.com>
       [not found]       ` <97gmv4$3cf$1@a1-hrz.uni-duisburg.de>
@ 2001-02-28 14:01       ` Tucker Taft
  2001-03-02 12:31         ` Maxim Reznik
  1 sibling, 1 reply; 5+ messages in thread
From: Tucker Taft @ 2001-02-28 14:01 UTC (permalink / raw)


Maxim Reznik wrote:
> 
> > You failed to post any code so nobody can check to see if what you are
> > interested in will compile with a compiler other than GNAT and/or Aonix.
> > Please post again - maybe we can help.
> >
> Thank you very much for help.
> I had posted my programm in previous message to the newgroup.
> 
> I'll appriciate if you try to compile my programm by your compiler.
> I'm sending it to you as attached file.
> I think Aonix compiler fails. And I'm going to ask Aonix support.
> But I want to be sure at first.
> 
> Aonix compiler shows error in first line after instantion of
> package CUpper.childs;
> It says [
> hello.ada: Error: line 40 col 1 LRM:8.3(26), There are overriding dispatching op
> erations declared in the same region in an instantiation, Ignoring declaration
>  ]

This appears to be a bug in the "AdaMagic" front end, otherwise known as
"my favorite front end," which is used by Aonix and Green Hills.  I am 
attempting to determine a work-around.  You might be able to find
one as well by playing a bit with your source code.  I'll post another
response if I find a not-too-painful workaround.  And of course,
I'll get to work on a fix to the front end!

> 
> I appreciate any comments.
> Thank you and excuse me my poor English.
> 
> Sincerely yours
> --
> Maxim Reznik
> email:  <reznikmm@hotmail.com>
> ICQ: 18702307

-- 
-Tucker Taft   stt@avercom.net   http://www.averstar.com/~stt/
Chief Technology Officer, AverCom Corporation (A Titan Company) 
Burlington, MA  USA (AverCom was formerly the Commercial Division of AverStar:
http://www.averstar.com/services/ebusiness_applications.html)



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

* Re: generic packages and dispatched operations
  2001-02-28 14:01       ` Tucker Taft
@ 2001-03-02 12:31         ` Maxim Reznik
  0 siblings, 0 replies; 5+ messages in thread
From: Maxim Reznik @ 2001-03-02 12:31 UTC (permalink / raw)


Thank everybody for help.
Aonix accepted this program to bug investigation.
Number of bug is ECR6505.


--
Maxim Reznik
email:  <reznikmm@hotmail.com>
ICQ: 18702307






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

end of thread, other threads:[~2001-03-02 12:31 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <96r871$1g5g$1@news.kiev.sovam.com>
2001-02-21  7:17 ` generic packages and dispatched operations Maxim Reznik
2001-02-21 15:00   ` Marin David Condic
     [not found]     ` <972rh2$26gk$1@news.kiev.sovam.com>
     [not found]       ` <97gmv4$3cf$1@a1-hrz.uni-duisburg.de>
2001-02-28 13:19         ` Marc A. Criley
2001-02-28 14:01       ` Tucker Taft
2001-03-02 12:31         ` Maxim Reznik

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