comp.lang.ada
 help / color / mirror / Atom feed
* Constraints?
@ 1998-12-22  0:00 Simon Wright
  1998-12-22  0:00 ` Constraints? David C. Hoos, Sr.
  1998-12-23  0:00 ` Constraints? dewar
  0 siblings, 2 replies; 6+ messages in thread
From: Simon Wright @ 1998-12-22  0:00 UTC (permalink / raw)


(I think I forgot to post this one, it hasn't appeared here yet; if
duplicated, sorry)

GNAT thinks the code below is OK, Object Ada (special edition)
doesn't.  If OA is right, as I fear it may be, can anyone offer a way
of getting the effect I'm after?

(t is some abstract base container, i is an abstract iterator over
such a container, n is a concrete container, r is a concrete iterator
over an n)

package foo is
    type t is abstract tagged null record;
    type i (f : access t'class) is abstract tagged limited null record;
    type n is new t with null record;
    type r (f : access n) is new i (f) with null record;
    -- OA says foo.ads: Error: line 5 col 37 LRM:3.7(15), Subtype of
    -- discriminant must be statically compatible with subtype of the
    -- corresponding parent discriminant
end foo;




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

* Re: Constraints?
  1998-12-22  0:00 Constraints? Simon Wright
@ 1998-12-22  0:00 ` David C. Hoos, Sr.
  1998-12-25  0:00   ` Constraints? Simon Wright
  1998-12-30  0:00   ` Constraints? Steve Todd
  1998-12-23  0:00 ` Constraints? dewar
  1 sibling, 2 replies; 6+ messages in thread
From: David C. Hoos, Sr. @ 1998-12-22  0:00 UTC (permalink / raw)



Simon Wright wrote in message ...
>(I think I forgot to post this one, it hasn't appeared here yet; if
>duplicated, sorry)
>
>GNAT thinks the code below is OK, Object Ada (special edition)
>doesn't.  If OA is right, as I fear it may be, can anyone offer a way
>of getting the effect I'm after?
>
>(t is some abstract base container, i is an abstract iterator over
>such a container, n is a concrete container, r is a concrete iterator
>over an n)
>
>package foo is
>    type t is abstract tagged null record;
>    type i (f : access t'class) is abstract tagged limited null record;
>    type n is new t with null record;
>    type r (f : access n) is new i (f) with null record;
>    -- OA says foo.ads: Error: line 5 col 37 LRM:3.7(15), Subtype of
>    -- discriminant must be statically compatible with subtype of the
>    -- corresponding parent discriminant
>end foo;
The real problem is a violation of LRM:3.7(13).
Both compilers will accept the code below.
package foo is
    type t is abstract tagged null record;
    type i (f : access t'class) is abstract tagged limited null record;
    type n is new t with null record;
    type a_n is access all n'class;
    type r (f : a_n) is new i (f) with null record;
end foo;


David C. Hoos, Sr.






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

* Re: Constraints?
  1998-12-22  0:00 Constraints? Simon Wright
  1998-12-22  0:00 ` Constraints? David C. Hoos, Sr.
@ 1998-12-23  0:00 ` dewar
  1 sibling, 0 replies; 6+ messages in thread
From: dewar @ 1998-12-23  0:00 UTC (permalink / raw)


In article <x7v7lvkk7f8.fsf@pogner.demon.co.uk>,
> package foo is
>     type t is abstract tagged null record;
>     type i (f : access t'class) is abstract tagged
>                           limited null record;
>     type n is new t with null record;
>     type r (f : access n) is new i (f) with null record;
> end foo;


This is definitely invalid. GNAT says:

foo.ads:5:13: subtype must be compatible with parent
discriminant

Robert Dewar
Ada Core Technologies

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    




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

* Re: Constraints?
  1998-12-22  0:00 ` Constraints? David C. Hoos, Sr.
@ 1998-12-25  0:00   ` Simon Wright
  1998-12-25  0:00     ` Constraints? dewar
  1998-12-30  0:00   ` Constraints? Steve Todd
  1 sibling, 1 reply; 6+ messages in thread
From: Simon Wright @ 1998-12-25  0:00 UTC (permalink / raw)


"David C. Hoos, Sr." <david.c.hoos.sr@ada95.com> writes:

> Simon Wright wrote in message ...
> >package foo is
> >    type t is abstract tagged null record;
> >    type i (f : access t'class) is abstract tagged limited null record;
> >    type n is new t with null record;
> >    type r (f : access n) is new i (f) with null record;
> >    -- OA says foo.ads: Error: line 5 col 37 LRM:3.7(15), Subtype of
> >    -- discriminant must be statically compatible with subtype of the
> >    -- corresponding parent discriminant
> >end foo;
> The real problem is a violation of LRM:3.7(13).
> Both compilers will accept the code below.
> package foo is
>     type t is abstract tagged null record;
>     type i (f : access t'class) is abstract tagged limited null record;
>     type n is new t with null record;
>     type a_n is access all n'class;
>     type r (f : a_n) is new i (f) with null record;
> end foo;

Thanks for that. I don't quite see what (13) has to do with it?

I think I always get frightened by this sort of thing, cos clearly
(!!) the code I need (which is also acceptable to both compilers) is

package foo is
    type t is abstract tagged null record;
    type i (f : access t'class) is abstract tagged limited null record;
    type n is new t with null record;
    type r (f : access n'class) is new i (f) with null record;
end foo;

Referring to my original, Robert Dewar wrote:

> This is definitely invalid. GNAT says:
> 
> foo.ads:5:13: subtype must be compatible with parent
> discriminant

... so I won't need to report the fact that 3.11B _doesn't_ detect the
error, then!




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

* Re: Constraints?
  1998-12-25  0:00   ` Constraints? Simon Wright
@ 1998-12-25  0:00     ` dewar
  0 siblings, 0 replies; 6+ messages in thread
From: dewar @ 1998-12-25  0:00 UTC (permalink / raw)


In article <x7vhfukit5q.fsf@pogner.demon.co.uk>,
  Simon Wright <simon@pogner.demon.co.uk> wrote:
> ... so I won't need to report the fact that 3.11B
> _doesn't_ detect the
> error, then!


Right, no need, this fix is post 3.11b (it is actually
post 3.11b2, which is the final 3.11b release, and is the
one on which 3.11p will be based). We now have all the
3.11b2 builds and 3.11p builds complete, the only remaining
step is to check out the NT packaging, which will be done
the coming week, so this release is finally getting close.

Robert Dewar
Ada Core Technologies

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    




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

* Re: Constraints?
  1998-12-22  0:00 ` Constraints? David C. Hoos, Sr.
  1998-12-25  0:00   ` Constraints? Simon Wright
@ 1998-12-30  0:00   ` Steve Todd
  1 sibling, 0 replies; 6+ messages in thread
From: Steve Todd @ 1998-12-30  0:00 UTC (permalink / raw)


     $$$$ THIS WILL MAKE YOU TONS OF MONEY, AND I'M NOT
           JOKING!!! $$$$$ - Alberta Vocational College - Calgary




        [ Home Page ] [ Follow Ups ] [ Post Followup ] [ Alberta Vocational
College - Calgary Forum ] [ FAQ ]


Posted by jim on September 14, 1998 at 18:25:13:

<< THIS REALLY CAN MAKE YOU EASY MONEY!! IT WORKS!!!
A little while back I was browsing through newsgroups, just
like you are
now, and came across an article similar to this that said you
could make
thousands of dollars within weeks with only an initial
investment of
$6.00! So I thought," Yeah, right, this must be a scam", but
like most
of us, I was curious, so I kept reading. Anyway, it said that
you send
$1.00 to each of the 6 names and address stated in the
article. You then
place your own name and address in the bottom of the list at
#6, and
post the article in at least 200 newsgroups. (There are
thousands) No
catch, that was it. The first thing I thought of was that this
is a
common old 'pyramid' scheme (through the mail that I have
always thought
was BS and throw in the trash). However, after studying this,
I began to
see that this was quite different. (Reach 100s of thousands,
with very
little effort, very little invested, and totally legal). So
after
thinking it over, and talking to a few people first, I thought
about
trying it. I figured what have I got to lose except 6 stamps
and $6.00,
right? Like most of us I was a little skeptical and a little
worried
about the legal aspects of it all. So I checked it out with
the U.S.
Post Office (1-800-725-2161) and they confirmed that it is
indeed legal!
Then I invested the measly $6.00. Well GUESS WHAT!!...within 7
days, I
started getting money in the mail! I was shocked! I figured it
would end
soon, but the money just kept coming in. In my first week, I
made about
$25.00. By the end of the second week I had made a total of
over
$1,000.00! In the third week I had over $10,000.00 and it's
still
growing. This is now my fourth week and I have made a total of
just over
$42,000.00 and it's still coming in rapidly. It's certainly
worth $6.00,
and 6 stamps, I have spent more than that on the lottery!! Let
me tell
you how this works and most importantly, why it
works.... also, make sure you print a copy of this article
NOW,
so you can get the information off of it, as you need it.
STEP 1:
Get 6 separate pieces of paper and write the following on each
Piece of paper "PLEASE PUT ME ON YOUR MAILING
LIST." Now get 6 US $1.00 bills and place ONE inside EACH of
the 6 pieces of paper so the bill will not be seen through the
envelope to prevent thievery. Next, place one paper in each
of the 6 envelopes and seal them. You should now have 6 sealed
envelopes, each with a piece of paper stating the above
phrase,
your name and address, and a $1.00 bill. What you are doing
is creating a service by this. THIS IS ABSOLUTELY LEGAL! Mail
the 6 envelopes to the following addresses:

#1) Aaron T. Jessen
855 W. Harrison Blvd.
Valparaiso, IN 46385

#2)Mark Baker
P.O Box 78805
Atlanta, GA 30357-0805

#3) Leona Terry
7204 21a St. S.E.
Calgary, AB     T2C 0V7

#4) Jeff Taylor
Apt. 911 5300 Rundlehorn Dr. N.E.
Calgary, AB           T1Y 3V5

#5) Justin Todd
155 5th. St S.E.
Portage la Prairie, MB        R1N 1H4

#6) Chris White
7634 24a St. S.E.
Calgary, AB   T2C 0Z7

STEP 2:
Now take the #1 name off the list that you see above,
move the other names up (6 becomes 5, 5 becomes 4, etc..)
and add YOUR Name as number 6 on the list.
STEP 3:
Change anything you need to, but try to keep this article as
close to
original as possible. Now, post your amended article to at
least 200 newsgroups. (I think there is close to 24,000
groups) All
you need is 200, but remember, the more you post, the more
money you make!
---DIRECTIONS ----- HOW TO POST TO NEWSGROUPS-----
Step 1)
You do not need to re-type this Entire letter to do your own
posting.
Simply put your cursor at the beginning of this letter and
drag your
cursor to the bottom of this document, and select 'copy' from
the edit
menu. This will copy the entire letter into the computer
memory.
Step 2)
Open a blank 'notepad' file and place your cursor at the top
of the
blank page. From the 'edit' menu select 'paste'. This will
paste a copy
of the letter into notepad so that you can add your name to
the list.
Step 3)
Save your new notepad file as a .txt file. If you want to do
your
postings in different sittings, you'll always have this file
to go back
to.
Step 4)
Use Netscape or Internet explorer and try searching for
various
newsgroups (on-line forums, message boards, chat sites,
discussions.)
Step 5)
Visit these message boards and post this article as a new
message by
highlighting the text of this letter and selecting paste from
the edit
menu. Fill in the Subject, this will be the header that
everyone sees as
they scroll through the list of postings in a particular
group, click
the post message button. You're done with your first one!
Congratulations...THAT'S IT! All you have to do is jump to
different
newsgroups and post away, after you get the hang of it, and it
will take
about 30 seconds for each newsgroup! **REMEMBER, THE MORE
NEWSGROUPS YOU
POST IN, THE MORE MONEY YOU WILL MAKE!! BUT YOU HAVE TO POST A
MINIMUM
OF 200** That's it! You will begin receiving money from around
the world
within days! You may eventually want to rent a P.O.Box due to
the large
amount of mail you will receive. If you wish to stay
anonymous, you can
invent a name to use, as long as the postman will deliver it.
**JUST
MAKE SURE ALL THE ADDRESSES ARE CORRECT.**
Now the WHY part: Out of 200 postings, say I receive only 5
replies (a
very low example). So then I made $5.00 with my name at #6 on
the
letter. Now, each of the 5 persons who just sent me $1.00 make
the
MINIMUM 200 postings, each with my name at #5 and only 5
persons respond
to each of the original 5, that is another $25.00 for me, now
those 25
each make 200 MINIMUM posts with my name at #4 and only 5
replies each,
I will bring in an additional $125.00! Now, those 125 persons
turn
around and post the MINIMUM 200 with my name at #3 and only
receive 5
replies each, I will make an additional $626.00! OK, now here
is the fun
part, each of those 625 persons post a MINIMUM 200 letters
with my name
at #2 and they each only receive 5 replies, that just made me
$3,125.
00!!! Those 3,125 persons will all deliver this message to 200
newsgroups with my name at #1 and if still 5 persons per 200
newsgroups
react I will receive $15,625,00! With an original investment
of only
$6.00! AMAZING! When your name is no longer on the list, you
just take
the latest posting in the Newsgroups, and send out another
$6.00 to
names on the list, putting your name at number 6 again. And
start
posting again. The thing to remember is, do you realize that
thousands
of people all over the world are joining the internet and
reading these
articles everyday, JUST LIKE YOU are now!! So can you afford
$6.00 and see if it really works?? I think so... People have
said, "what if the plan is played out and no one sends you the
money? So what! What are the chances of that happening when
there are tons of new honest users and new honest people who
are joining the Internet and newsgroups everyday and are
willing
to give it a try? Estimates are at 20,000 to 50,000 new users,
every
day, with thousands of those joining the actual Internet.
Remember, play
FAIRLY and HONESTLY and this will work >> >>




Follow Ups:



   Post a Followup to $$$$ THIS WILL MAKE YOU TONS OF MONEY,
  AND I'M NOT JOKING!!! $$$$$ - Alberta Vocational College - Calgary







Name   :
E-Mail :
Subject:
Comments:

Optional Link URL :
Link Title        :
Optional Image URL:




              [ Follow Ups ] [ Post Followup ] [ Alberta Vocational College
- Calgary Forum ] [ FAQ ]


David C. Hoos, Sr. wrote:

> Simon Wright wrote in message ...
> >(I think I forgot to post this one, it hasn't appeared here yet; if
> >duplicated, sorry)
> >
> >GNAT thinks the code below is OK, Object Ada (special edition)
> >doesn't.  If OA is right, as I fear it may be, can anyone offer a way
> >of getting the effect I'm after?
> >
> >(t is some abstract base container, i is an abstract iterator over
> >such a container, n is a concrete container, r is a concrete iterator
> >over an n)
> >
> >package foo is
> >    type t is abstract tagged null record;
> >    type i (f : access t'class) is abstract tagged limited null record;
> >    type n is new t with null record;
> >    type r (f : access n) is new i (f) with null record;
> >    -- OA says foo.ads: Error: line 5 col 37 LRM:3.7(15), Subtype of
> >    -- discriminant must be statically compatible with subtype of the
> >    -- corresponding parent discriminant
> >end foo;
> The real problem is a violation of LRM:3.7(13).
> Both compilers will accept the code below.
> package foo is
>     type t is abstract tagged null record;
>     type i (f : access t'class) is abstract tagged limited null record;
>     type n is new t with null record;
>     type a_n is access all n'class;
>     type r (f : a_n) is new i (f) with null record;
> end foo;
>
> David C. Hoos, Sr.







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

end of thread, other threads:[~1998-12-30  0:00 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-12-22  0:00 Constraints? Simon Wright
1998-12-22  0:00 ` Constraints? David C. Hoos, Sr.
1998-12-25  0:00   ` Constraints? Simon Wright
1998-12-25  0:00     ` Constraints? dewar
1998-12-30  0:00   ` Constraints? Steve Todd
1998-12-23  0:00 ` Constraints? dewar

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