HDTenEightyP/NetNews huggingface dataset:
From: westley@calspan.com (Terry J. Westley)
Subject: Re: Language pitfalls (was Re: FORTRAN bug)
Organization: Calspan Advanced Technology Center
Date: Thu, 17 Dec 1992 14:18:56 GMT

In article <EACHUS.92Dec15202249@oddjob.mitre.org> eachus@oddjob.mitre.org (Robert I. Eachus) writes:
>    Actually, there is an Ada rule which normally catches this,

["this" refers to substituting "null" for "return null" by mistake]

>and
>which Robert Dewar and I have argued should be removed in Ada 9X.  (A
>function must contain a return statement RM 6.5(1).)  If it belongs on
>the top ten list, then the rule should stay.
>
>    (What Robert Dewar and I objected to was that certain functions
>whose only intended effect is to raise an exception must still contain
>a return statement.  This results in junk return statements in stubbed
>out code, and makes a stubber much harder to write.)
>
>--
>
>					Robert I. Eachus

Many compilers produce a warning for such a situation.  IMHO, this is
good but doesn't go far enough.

I hate compiler warnings; I will typically do anything to eliminate them
because I done't want to keep rereading the same warnings every time a unit
is compiled.  Sometimes, they cannot be eliminated as in the example above.

I would like to have the ability, perhaps with a pragma, which allows me to
tell the compiler that I know a certain statement will raise a warning of
a certain class and to suppress the warning.  This must be done on a statement
by statement (really warning by warning) basis.  Turning off all the warnings
is too dangerous.  They really are useful.

Have any compiler gurus considered this?

-- 
Terry J. Westley, Principal Computer Scientist
Calspan Corporation, P.O. Box 400, Buffalo, NY 14225
westley@calspan.com
Let's hear it for smart mailers that cut off long signa
Newsgroups: comp.lang.ada
From: stt@spock.camb.inmet.com (Tucker Taft)
Subject: Re: FORTRAN bug(was Re: C++ vs. Ada -- Is Ada loosing?)
Organization: Intermetrics Inc, Cambridge MA
Date: Fri, 11 Dec 1992 23:22:31 GMT

In article <19921211.142820.329@almaden.ibm.com> 
  jnestoriak@vnet.ibm.com (John Nestoriak III) writes:

>In <1992Dec11.210404.2480@inmet.camb.inmet.com> Tucker Taft writes:

>>One of our goals for Ada 9X has been to give system programmers
>>back this feeling of satisfaction, so that you can do "code generation
>>in your head" for most Ada constructs.  In other words,
>>you can predict about how many machine instructions (and
>>generally which ones ;-) will be generated for each
>>construct in your program.  For a real-time embedded language,
>>this seems particulary important.
>
>Are there plans to add bitwise operations to Ada 9X?  Lack of
>built in shift operators was a disappointing discovery for me.
>I know that Ada is a high order language and therefor less suitable
>for manipulating bits than say C, but there are high level functions
>that need to manipulate bits.  I'm thinking in particular of
>compression routines.  The project I work on is Ada but we had to
>implement compression using C.

Yes.  We are planning to add "modular types" to Ada 9X,
which are unsigned, wrap-around types with a user-specified
modulus (normally a power-of-2).  These types will have +/-, etc., 
bit-wise and, or, xor, and not, as well as a language-defined
generic package that provides shift operations.  This
package is intended to be recognized by the compiler, so
that these shift operations result in inline machine instructions for
shifting.

Here is the tentative syntax:

   type Unsigned_16 is mod 2**16;  -- declare a 16-bit unsigned type

   package Shift_16 is new System.Shifts(Unsigned_16); use Shift_16;
                                   -- Get the shift functions
   X : Unsigned_16 := 16#00FF#;
   Y, Z : Unsigned_16;
begin
   Y := Left_Shift(X, 5);          -- Try them out
   Z := X and Y;
   if Z /= 16#00E0# then
       Put_Line("Send the 9X compiler back"); -- ;-)

etc...

S. Tucker Taft  stt@inmet.com
Ada 9X Mapping/Revision Team
Intermetrics, Inc.
Cambridge, MA  02138
Newsgroups: comp.lang.ada
From: cscott@csc.afit.af.mil[C (Capt Carl W. Scott)
Subject: re: Ada Newsletter
News-Software: VAX/VMS VNEWS 1.3-4   
Reply-To: cscott@csc.afit.af.mil
Organization: Air Force Institute of Technology - WPAFB, OH, USA
Distribution:  world
Date: Tue, 15 Dec 1992 02:07:21 GMT

to: maysee@ss1.sews.wpafb.mil

EE>Here at the Higher Order Language Control Facility we distribute a free
EE>quarterly newsletter.  If you are interested in receiving the
EE>newsletter, send e-mail to maysee@ss1.sews.wpafb.mil or post a 
EE>message to comp.lang.ada if you cannot e-mail directly to me.

I tried several times to send you an e-mail but was unsuccessful.  Please
add me to the distribution list for the newsletter.  I'll be at the 
following new duty address effective 2 Jan 93:

      HQ ACC/SCPS
      ATTN: CPT Carl Scott
      180 Benedict Ave
      Suite 209
      Langley AFB VA 23665-1993

Thanks!  
Carl

Newsgroups: comp.lang.ada
From: cobarruvias@asd2.jsc.nasa.gov
Subject: Re: IBM & Air Traffic Control
Organization: NASA/JSC
Distribution: usa
Date: Mon, 14 Dec 1992 15:58:11 GMT

In article <1992Dec12.002523.27592@beaver.cs.washington.edu>
pattis@cs.washington.edu (Richard Pattis) writes:
>
>In today's NYT business section, there was an article about the government
>threatening to cancel a $3.8 billion contract with IBM to overhaul the
>air traffic control system. It says
>
>  "Because of a software foul-up, the contract with the FAA has already
>   suffered an 18 month delay...The problems involve testing and integrating
>   software in what is called the initial sector suite system..."
>
>This seems like a very large and embarasing screwup.

Unfortuantely this will probably give the Chicken Littles of Ada another reason
for Ada "falling", I mean, "failing" even though it is not a language problem.
There are other factors involved such as the lack of a stable development
environment and the transition to yet another IBM platform in the middle of
development. Given any project in any language, this would play havoc on any
schedule.


>
>Anyone know more about the project. I thought the air traffic control stuff
was
>being done "mostly" in Ada; if not, anyone know what language was used. Even
>better, anyone know what is "really" behind the delay.
>
>Rich Pattis
>
>
>-- 
>------------------------------------------------------------------------------
>  Richard E. Pattis                     "Programming languages are like
>  Department of Computer Science         pizzas - they come in only "too"
>    and Engineering                      sizes: too big and too small."
>



*****************************************************************
John R. Cobarruvias, Texas A&M Class of '78, 
NASA Johnson Space Center Houston Tx.
(713)483-9357

"And to think..................I hesitated" (Hellraiser II)
*****************************************************************

Newsgroups: comp.lang.ada
From: mccall@mksol.dseg.ti.com (fred j mccall 575-3539)
Subject: Re: FORTRAN bug(was Re: C++ vs. Ada -- Is Ada loosing?)
Organization: Texas Instruments Inc
Date: Tue, 15 Dec 1992 16:36:36 GMT

In <1992Dec15.024340.22575@seas.gwu.edu> mfeldman@seas.gwu.edu (Michael Feldman) writes:

>In article <1992Dec14.170421.18709@mksol.dseg.ti.com> mccall@mksol.dseg.ti.com (fred j mccall 575-3539) writes:
>>
>>I agree.  I feel the same way about Ada, by the way.  There's simply
>>too much there to be teaching it to people as a first language.
>Well, you're certainly entitled to your opinion. Those of us who are
>actually _doing_ it, and (most of) our students, like what they see.

There are also a lot of places that are teaching C as a first
language.  That doesn't make it any less a mistake, in my opinion. 

>We don't tell the students what a verbose, hairy, big, risky dinosaur
>Ada is, so they somehow get the impression they can learn it. And they do.

Substitute C for Ada in the above sentence and it makes equally good
sense.  I still don't think it's a good idea.  

>We teach our infant children a subset of English (or German, or whatever),
>and we teach our freshmen a subset of Ada. They learn the rest as they
>grow up. It's a language you can grow into.

As is any language.  I don't consider this a particularly good
argument for using it in a beginning class.

>>
>>Pascal tends to be a somewhat more appropriate choice for a first
>>language.  It's a nice protected environment with a limited set of
>>features. 
>The downside is that vanilla Pascal (the ISO standard version) is much
>too underpowered for the software engineering stuff (like separate
>compilation) we want to do, even with first-years. So many teachers go
>with Turbo. Only trouble is, Philippe has decided that Turbo for Unix
>isn't worth his trouble, so yanking the kids off their PC's onto the
>Unix boxes in the lab is impossible unless they switch to C...or Ada.

Then they should make the switch.  One would hope you're planning on
them learning more than one language, anyway.

-- 
"Insisting on perfect safety is for people who don't have the balls to live
 in the real world."   -- Mary Shafer, NASA Ames Dryden
------------------------------------------------------------------------------
Fred.McCall@dseg.ti.com - I don't speak for others and they don't speak for me.
Newsgroups: comp.lang.ada
From: jhb@dale.cts.com (John Bollenbacher)
Subject: Re: Suggestion for multivalue boolean case for 9X
Organization: Titan Linkabit Corporation
X-Newsreader: Tin 1.1 PL5
Date: Mon, 14 Dec 1992 21:07:21 GMT

Mark Dunbar (dunbar@saifr00.cfsat.honeywell.com) wrote:
: In article <dnsurber.724028252@node_26400> dnsurber@lescsse.jsc.nasa.gov (Douglas N. Surber) writes:
: >How many times have you seen code like the following:
: >
: >    if cond_1 then
: >        if cond_2
: >	    if cond_3 then
: >		s_t_t_t;
: >	    else
: >		s_t_t_f;
: >	    end if;
: >	else
: >	    if cond_3 then
: >		s_t_f_t;
: >	    else
: >		s_t_f_f;
: >	    end if;
: >	end if;
: 
:       [etc]...
: 
: >I find this hard to read and even harder to maintain.  Cond_3 appears
: >four times.  That's a maintenance nightmare.  A case statement that
: >worked on arrays of booleans would be a big improvement.  Something like
: >the following:
: >
: >    case (cond_1, cond_2, cond_3) is
: >	when (true,  true,  true ) =>
: >	    s_t_t_t;
: >	when (true,  true,  false) =>
: >	    s_t_t_f;
: >	when (true,  false, true ) =>
: >	    s_t_f_t;
: >	when (true,  false, false) =>
: >	    s_t_f_f;
: 
: 	[etc]...
: >
: >Douglas Surber
: >Lockheed
: >Houston, TX
: >
: Using Ada83, instead of the nested if statement, one could do the following:
: 
:   if    ( not Cond_1 ) and ( not Cond_2 ) and ( not Cond_3 ) then
:     ...
:   elsif ( not Cond_1 ) and ( not Cond_2 ) and (     Cond_3 ) then
:     ...
:   elsif ( not Cond_1 ) and (     Cond_2 ) and ( not Cond_3 ) then
:     ...
:   elsif ( not Cond_1 ) and (     Cond_2 ) and (     Cond_3 ) then
:     ...
:   elsif (     Cond_1 ) and ( not Cond_2 ) and ( not Cond_3 ) then
:     ...
: 
:   etc.
: 
: Although I do agree the case statement would be more elegant (sp?) and
: potentially faster if there were enough branches to cancel out the
: overhead of a case.

Though I also agree that the original posting has merit, another possibility 
that I have used is something like:

  declare
    type BOOLS is array (1..3) of BOOLEAN;
    VAL : constant BOOLS := (COND_1, COND_2, COND_3);
  begin
    if VAL = (TRUE, TRUE, TRUE) then
      ...
    elsif VAL = (TRUE, TRUE, FALSE) then
      ...
    etc.
--
-----------------------------------------------------------------------------
- John Bollenbacher                                        jhb@dale.cts.com -
- Titan Linkabit Corp.                                       (619) 552-9963 -
- 3033 Science Park Rd.                                                     -
- San Diego, Ca. 92121                                                      -
-----------------------------------------------------------------------------
Newsgroups: comp.lang.ada
From: mfeldman@seas.gwu.edu (Michael Feldman)
Subject: Re: Ada compiler wanted!
Keywords: FSF Ada Apple
Organization: George Washington University
Date: Sat, 12 Dec 1992 22:27:11 GMT

In article <1992Dec12.201015.11165@nwnexus.WA.COM> emagnuso@halcyon.com (Erik Magnuson) writes:
>In article <1992Dec9.084239.25699@sei.cmu.edu> ae@sei.cmu.edu (Arthur Evans) writes:
>>DGB4@psuvm.psu.edu asks
>>    Does a NON-MPW Ada compiler exist for the Macintosh? ...
>>
>[existing Mac compiler stuff deleted]
>>The future looks better, though.  Robert Dewar, who is part of the GNAT
>>Project at NYU that is implementing Ada under GNU, told me that there
>>will be a Mac port on that project.  When?  Perhaps the middle of 1993?
>>That product, like all GNU products, will cost no more than media
>>copying and probably be available free by FTP.
>>
>>At Evans
>
>Is this really likely given the FSF antipathy to Apple? Do the GNAT
>implementors feel bound by RMS request to boycott Apple and not
>support GNU software on Apple?
>
Interesting question. I'm not sure whether NYU per se will do the Mac
port, but there will undoubtedly be a port, if for no other reason than
there are so many Macs in education. There is a gcc for the Mac.

Stallman must be in a bit of a quandary: the FSF side of him wants to
see dispersion of free software as widely as possible; the LPF side of
him wants to boycott Apple. 

Mike Feldman

Newsgroups: comp.lang.ada
From: tne@world.std.com (Thomas N Erickson)
Subject: Re: Ada compiler for VM/CMS
Organization: The World Public Access UNIX, Brookline, MA
Date: Mon, 14 Dec 1992 05:41:30 GMT

parris@cs.scarolina.edu (Barry Parris) writes:

>I understand that IBM no longer sells their Ada compiler for VM/CMS.  Does
>anyone know of other compilers?  This would be for an IBM 9375.


We at Alsys have a VM/CMS compiler.  Please call Scott Dorman, (617)270-0030.



-- 
Tom Erickson
Alsys
tne@world.std.com
Newsgroups: comp.lang.ada
From: sommar@enea.se (Erland Sommarskog)
Subject: Re: Suggestion for multivalue boolean case for 9X
Organization: Enea Data AB
Date: Sun, 13 Dec 1992 15:24:38 GMT

Douglas N. Surber (dnsurber@lescsse.jsc.nasa.gov) writes:
>    case (cond_1, cond_2, cond_3) is
>	when (true,  true,  true ) =>
>	    s_t_t_t;
>	when (true,  true,  false) =>
>	    s_t_t_f;
>....
>    end case;

Cobol's EVALUATE works something this. It was a couple a years ago
I played with it, but I recall that I had handy use of it. Particulary
as you could throw in ANY for a parameter to say that for the combination
of the other ones this one didn't care. (Or values that did care had been
covered by previous alternatives.) Unfortunate Cobol didn't allow you
to express non-contiguous values for the same alternative, which some-
what limited the usefulness.

But that was Cobol. Ada has better means as already have been shown by
other authors in this conferences.

>I don't know if it's too late to consider this for 9X,

Thankfully :-) it is far too late. But they scrapped my idea of chained
boolean expressions (e.g. a > b > c) too, so you are not alone.
-- 
Erland Sommarskog - ENEA Data, Stockholm - sommar@enea.se
Newsgroups: comp.lang.ada
From: cobarruvias@asd2.jsc.nasa.gov
Subject: Re: Tired of the Ada vs. (Pick your language) discussion
Organization: NASA/JSC
Distribution: usa
Date: Wed, 16 Dec 1992 15:41:29 GMT

In article <BzCs15.B28@gdls.CSCTMD.COM> tarcea@gdls.CSCTMD.COM (Glenn Tarcea)
writes:
>
>  Can we please stay on the topic of discussing Ada, and Ada in
>real-world systems. All languages have their strengths and weaknesses
>and I am tired of hearing religous comparisons of why either Ada is
>better than language X or language X is better than Ada. Maybe a news
>group called comp.lang.religion should be started for these stupid
>discussions. I program in both 'C' and Ada and I can appreciate the
>strengths (and weaknesses) of each of the languages, I don't need
>somebody to give me their supposedly unbiased opinion on language
>greatness.
>
>

I AGREE! How about a group called: comp.lang.Ada.Argue or
comp.lang.Ada.Waste_of_time or comp.lang.Ada.get_back_to_work.

If you are still compelled to post about Ada .vs. whatever, think twice, and
dont! 


*****************************************************************
John R. Cobarruvias, Texas A&M Class of '78, 
NASA Johnson Space Center Houston Tx.
(713)483-9357

"And to think..................I hesitated" (Hellraiser II)
*****************************************************************

Newsgroups: comp.lang.ada
From: stt@spock.camb.inmet.com (Tucker Taft)
Subject: Re: Language pitfalls (was Re: FORTRAN bug)
Organization: Intermetrics Inc, Cambridge MA
Date: Tue, 15 Dec 1992 20:35:58 GMT

In article <1992Dec15.180821.17817@beaver.cs.washington.edu> 
  pattis@cs.washington.edu (Richard Pattis) writes:

> . . .
>Often the base case of a recursive function to manipulate a list looks like:
>
>  IF mumble = NULL THEN
>    RETURN NULL;
>  ELSE ...
>
>What my students sometimes write is
>
>  IF mumble = NULL THEN
>    NULL;
>  ELSE ...
>
>Here the statement NULL replaces the returning of a NULL value (which might be
>better to denote as NIL, at the expense of another reserved word). . . .

Oh boy.  That is a nasty one.  This argues for a "friendly" 
Ada compiler giving a warning about any use of "null;" other
than the idiomatic ones like "when others => null;" or "begin null; end;"
(especially in a function that returns an access type ;-).

In retrospect, one could argue that it would have been better
to have no "null" statement at all (other than simply ";") than
to create a situation allowing this kind of one word error.

>Rich Pattis

S. Tucker Taft    stt@inmet.com
Intermetrics, Inc.
Cambridge, MA  02138
Newsgroups: comp.lang.ada
From: obry@flash.bellcore.com (Pascal Obry)
Subject: Re: FORTRAN bug(was Re: C++ vs. Ada -- Is Ada loosing?)
Organization: /u/obry/.organization
	<1992Dec8.172551.16780@newshost.lanl.gov>
	<1992Dec9.060218.23940@seas.gwu.edu>
	<1992Dec11.132942.24054@mksol.dseg.ti.com>
Date: 11 Dec 92 16:42:03


Fred,

> Single character ones?  Probably not, but that just indicates that Ada
> is incredibly more verbose than C.  One of the things I DISlike about
> it, by the way.

Why do you use english ?

( > @ - + / ~ $

==============================
Because I'am the only one to know this language I put below the dictionary :

> this
( try
$ word
+ it
, -
/ is
@ language
~ without
==============================


I like Ada because you can *read* it. And this seem to be one of the most
important thing about a language. With goods choices for the identifier, you
can read an Ada progam like a text, you don't have to translate what you read.

You write a program one time, but how many time you read it ?

Pascal.
--

-------------------------------------------------------------------------------
--  Pascal OBRY								     --
--  Room 2D-337				e_mail : obry@bellcore.com  	     --
--  Bellcore								     --
--  445 South Street			voice : 1 - 201 829 4039	     --
--  Post Office Box 1910		FAX   : 1 - 201 829 5981	     --
--  Morristown, New Jersey 07962-1910					     --
-------------------------------------------------------------------------------

  `` inheritance is surely a good answer, but who knows the question ? ''
Newsgroups: comp.lang.ada
From: sampson@nosc.mil (Charles H. Sampson)
Subject: Functions That Only Raise an Exception
Organization: Computer Sciences Corporation
Date: Thu, 17 Dec 1992 19:31:04 GMT

In article <1992Dec16.200205.8912@linus.mitre.org> jclander@texas.mitre.org (Julian C. Lander) writes (responding to a request for an example of a function that does nothing but raise an exception):

>I didn't write this one, but it is in some code I'm using.
>The situation is interface with C-language functions, which return
>error codes.  The chunk of code before me (I don't know a good noun
>for what it is--it builds about 3 different executables) has a function
>called Raise_Appropriate_Exception, which raises the exception 
>corresponding to the return code it has been passed.
>
>Since it never gets a 0 (its caller should avoid that), it doesn't return.
>
>I don't know that it's the best solution to the problem (I'm not wild
>about it, frankly), but that's what I have.

     I can think of a number of questions about this function.  The one
I'm most interested in is why is it a function rather than a procedure?
Particularly a function whose name is a verb phrase?

				Charlie
From: am_barry@csd.uwe.ac.uk (AM Barry)
Newsgroups: comp.lang.ada
Subject: Rational XLib Bindings
Summary: XLib Bindings on Sparc using SunAda
Keywords: Xlib Ada
Date: 16 Dec 92 11:31:16 GMT
Followup-To: am_barry@uk.ac.uwe.csd
Organization: University of the West of England, Bristol

I have just obtained revision 6.0.0 of the Xlib bindings to Ada by Rational.
This has been written mainly for the Telesoft compiler on 680x0. I have the
ability but not the time to port this to Sparc & SunAda. Surely there must be
someone who has already done this port ??? If so, and it is obtainable by
ftp, please let me know. (I have tried to query Rational via the email address
they provide with the release, but the mail keeps bouncing.)

Many Thanks,

Alwyn Barry

-- 
/-----------------------------------------------------------------------\
| Alwyn Barry, Senior Lecturer,          Ph: 0044 272 656261 extn. 3135 |
| Computer Science Dept, University of the West of England, Bristol, UK |
Newsgroups: comp.lang.ada
From: dlc@ddsdx2.jhuapl.edu (Dave Collard x7468)
Subject: Re: Novice Question on Record Representation
Organization: Johns Hopkins University
Distribution: usa
Date: Thu, 17 Dec 92 13:28:50 GMT

>Josh Lam
>Honeywell Inc
>lam@saifr00.cfsat.honeywell.com

-- OOH, OOH, OOH!!! Something technical on comp.lang.ada!  Wow!
-- Today should become a federal holiday! :-)

package Some_Package is

 type Some_Int is new short_integer;
 for Some_Int'size use 16;

 type Some_Type is private;

 private

  type Some_Type is new integer;
  for Some_Type'size use 32;

end Some_Package;


with Some_Package;
package My_Package is

 XX : constant Integer := Integer(Some_Package.Some_Type'Size);

 type My_Rec (Choice: Boolean := True) is record
   case Choice is
     when True =>
       A : Some_Package.Some_Int;
       B : Some_Package.Some_Int;
       C : Some_Package.Some_Type;
     when False =>
       D : Some_Package.Some_Int;
   end case;
 end record;
   
-- for My_Rec use record
--    A      at 0 range 0..15;
--    B      at 0 range 16..31;
--    C      at 1 range 0..31;     -- of course there is an error here!
--    Choice at 2 range 0..31;
--    D      at 0 range 0..15;
-- end record;

 -- Is the storage unit on your machine really 32 bits?  the '0' in "A at 0" 
 -- refers to which storage unit to start the component at.  But the answer
 -- to your question is that you CAN use rep specs with private types.  The
 -- attributes of private types are also available (such as 'SIZE).  The 
 -- problem in your example is overlapping components of your record.  Try:

 for My_Rec use record
    A      at 0 range 0..15;
    B      at 2 range 0..15;
    C      at 4 range 0..31;     -- of course there is an error here! NOT!
    Choice at 8 range 0..31;
    D      at 0 range 0..15;
 end record;

 -- This works for me.  Yes I actually compiled it.

-- etc etc

end My_Package;

--I know that I cannot do the above cos C is of Some_Package.Some_Type which
--is a private type.
--
--So, other than yelling at the person and getting him to change his type
--to public, what are my alternatives given that I need to use record
--representation. Please also let me know some pros and cons (if any) to any
--alternative.
--
--Thanks in advance!
--

--Thor
--dlc@ddsdx2.jhuapl.edu
--collard@capsrv.jhuapl.edu
Newsgroups: comp.lang.ada