HDTenEightyP/NetNews huggingface dataset:
From: pelakh@convex.com (Boris Pelakh)
Subject: Re: Match function ?
Date: Tue, 25 Aug 1992 16:49:31 GMT
Distribution: comp.lang.ada
Organization: Engineering, CONVEX Computer Corp., Richardson, Tx., USA
X-Disclaimer: This message was written by a user at CONVEX Computer
              Corp. The opinions expressed are those of the user and
              not necessarily those of CONVEX.

In article <OBRY.92Aug25111154@cheesesteak.flash.bellcore.com> obry@flash.bellcore.com (Pascal Obry) writes:
>What I want is something like :
>
>	match ("a string here", "[a-z]+[^A-Z]*g")

If you are working on an UNIX system, use the re_comp/re_exec functions from
libc.a via pragma INTERFACE. Or. grab the optimized regex functions used in the
gnu projects and rewrite them in Ada, thus getting rid of the copyleft.


-- 
Boris Pelakh		Ada Project Leader          pelakh@convex.com
		     Convex Computer Corporation
"If winning isn't important, why keep score ?"	-- Lt. Worf, Star Trek TNG.
From: kjm@sactoh0.sac.ca.us (Kevin J. Metcalfe)
Newsgroups: comp.lang.ada
Subject: Fonts in Ada
Keywords: Help me!
Date: 4 Sep 92 14:37:42 GMT
Organization: Sacramento Public Access Unix

Hello,
     I am looking for some kind of font library to use with Ada.  I
am involved in a project using IntegerAda under DOS.  We need a
selection of nice fonts for a busy screen display.  We only got one
font with our compiler and it is pretty poor.  

     BTW, we have found the IntegerAda package to be extremely bad.
The environment is not only poorly designed, but very buggy.  It
cost several thousand dollars and IMHO is not half as good as any
of the borland products.  Just my $.02 worth.

Later,

Kevin
-- 
--------------------------------------------------------------------------
|  Kevin Metcalfe      Work:   Metcalfeke%allin1.dnet@c3p0.sm-alc.af.mil |
|                      Home:   kjm@sactoh0.sac.ca.us                     |
|  Something witty goes here.                                            |
Newsgroups: comp.lang.ada
From: stt@spock.camb.inmet.com (Tucker Taft)
Subject: Re: Another Question about protected records
Organization: Intermetrics Inc, Cambridge MA
Date: Tue, 25 Aug 1992 17:53:31 GMT

In article <1992Aug19.222949.12391@seas.gwu.edu> 
lodhi@seas.gwu.edu (Fakhar Lodhi) writes:

>Yesterday I asked two questions about protected records. While I am 
>still waiting for the answers, I have another question about their syntax.
>I would greatly appreciate if some body, especially some one in the Ada9x 
>design team, could provide me the answers. Thanks.
>
>Now the question is:
>
>Section 9.5 of the Ada 9X Mapping Vol. II (Mapping Specification),
>version 4.0, 24 Dec. 91, gives the syntax of a protected record specification
>as follows:
>
>(para 5)
>
>   protected_record_specification ::=
>     protected [type] identifier [discriminat_part] is
>       {protected_operation_declaration}
>     private
>       {protected_operation_declaration}
>     record
>       component_list
>     end [protected_record_simple_name]
>
>The same syntax is used in example given in section 9.6
>
>But, an example in section 3.3.2.1 of Ada 9X Mapping Vol. I (Mapping Rationale)
>ver. 4.1, 4 March 92 uses a different syntax. The code is as follows:
>
>    < some stuff deleted >
>    protected record type mailbox is
>      
>       < stuff deleted >
>    private record
>       
>       < stuff deleted>
>
>    end record;
>
>which is clearly different from the syntax given above.
>(end record is not a valid syntax.)
>
>Now the question is, which one of the two is correct?

Presumably you are referring to the following example 
(slightly different from what you typed in):

    protected type MAILBOX is
        . . .
    private record
        . . .
    end record;

This example has the typographical error
you mention ("end record" instead of end [identifier])
but is otherwise consistent with the BNF given above, because
  {protected_operation_declaration}
matches the empty sequence, allowing "private" and "record"
to appear right next to each other.

In any case, we are currently considering dropping the reserved
word "record" completely from the syntax (and name) for protected types,
so that the new syntax would be :

   protected [type] identifier[discriminant_part] is
     {protected_operation_declaration}
   private
     {protected_item}
   end [identifier];

where protected_item is either a protected_operation_declaration
or a component_declaration.

>Once again, I would greatly appreciate your help. Thanks.

Thank you for pointing out the typographical error in the example.
Feel free to send other editorial or technical comments directly to 
"ada9x-mrt@inmet.com" with the format indicated in the front of 
the relevant mapping document (!topic, !reference, etc.)

>Fakhar Lodhi

S. Tucker Taft  stt@inmet.com
Ada 9X Mapping/Revision Team
Intermetrics, Inc.
Cambridge, MA  02138
Newsgroups: comp.lang.ada
From: BERRYMAN@orca.drep.dnd.ca (DON BERRYMAN)
Subject: Variant Record Defaults
Organization: Defence Research Establishment Pacific
Date: Wed, 2 Sep 1992 22:38:07 GMT
X-News-Reader: VMS NEWS 1.20


Please concider the following code fragment:

     package dstring is
         type text (maxlen: positive := 64) is private;
         ---STUFF DELETED--
     private
         type text (maxlen: positive := 64) is
     	record
     	    last: natural := 0;
     	    data: string (1..maxlen);
     	end record;
     end dstring;

     with dstring;
     procedure useit is
        type buffer is record
             data: dstring.text;
        end record;
        aaa: buffer;
        bbb: dstring.text;
     begin
        null;
     end useit;


When compiled on VAX/VMS Ada I get the following:

     S2$ ada useit
         3      type buffer is record
     ...........1
     %ADAC-I-CONS_OR_NUM_ERR, (1) CONSTRAINT_ERROR or NUMERIC_ERROR will be raised
             here [LRM 11.1(5-6), F.9.5]
             during evaluation related to record type buffer at line 3
     %ADAC-I-ENDDIAGS, Ada compilation completed with 1 diagnostic
     S2$

What appears to be the problem is that BUFFER.DATA is not using the default
for MAXLEN. When I specify it in the record definition the message goes
away. Since I can create the variable, BBB, of type DSTRING.TEXT it does not
seem to be a problem with my definitions. So why does ADA not use the 
default for BUFFER.DATA???  

I'm sure the reason is given in an obscure section of the LRM,


Don Berryman
Defence Research Establishment Pacific
Canadian Forces Base Esquimalt
Victoria, BC, CANADA, V0S-1B0
604-363-2731    604-363-2856fax
berryman@orca.drep.dnd.ca
From: andrewd@cs.adelaide.edu.au (Andrew Dunstan)
Newsgroups: comp.lang.ada
Subject: Re: ADA question
Date: 31 Aug 92 04:20:54 GMT

In article <64955@cup.portal.com>, R_Tim_Coslet@cup.portal.com writes:
|> In article: <8363@sirius.ucs.adelaide.edu.au>
|> 	andrewd@cs.adelaide.edu.au (Andrew Dunstan) writes...
[..]
|> > DECLARE
|> >    String_Const : CONSTANT String := My_String_Function;
|> >    String_Var : String (String_Const'RANGE) ;
|> >    for string_var use at string_const'address ;
|> > BEGIN
|> >    Process (String_Var) ; -- parameter's mode: IN OUT
|> > END ;
|> > 
[..]
|> 
|> OUCH! Don't ever do this! It is expressly forbidden in the Ada LRM to use
|> the "for ... use at" clause for the purpose of overlaying data structures
|> on top of each other and the results are totally undefined (especially if
|> you are trying to overlay constants and variables... the constant might
|> have been placed in ROM by the compiler and linker in certain environments)!
|> 
|> 
                                        R. Tim Coslet
Thanks for pointing this out - I did actually look in the LRM before I
posted, but obviously not hard enough! Finding these little things in the
LRM is like looking for a needle in a haystack.

Still, mea culpa.

-- 
#######################################################################
#  Andrew Dunstan                   #   There's nothing good or bad   #
#  Department of Computer Science   #   but thinking makes it so.     #
#  University of Adelaide           #                                 #
#  South Australia                  #          - Shakespeare          #
#  net: andrewd@cs.adelaide.edu.au  #                                 #
#######################################################################
From: gunawan@a.cs.wvu.wvnet.edu (Margaretha W. Gunawan)
Newsgroups: comp.lang.ada
Subject: a NEW, IMPROVED Ada Repository!
Keywords: ada repository
Date: 3 Sep 92 13:32:48 GMT

AdaNET is FREE to public Ada Repository.  It contains a comprehensive
collection of information about all aspects of software engineering,
as well as an extensive collection of public domain software development
efforts.

AdaNET Service Version 3 (ASV3) uses the NASA Electronic Library System
(NELS 1.2) for the library mechanism.  Two user interfaces are available:

     - ASCII Interface: only requires a terminal/PC with a 1200 baud
                        (or higher) modem.  The most similar to the
                        current ASV2.
     - X Interface    : requires a high level PC (X windows capable),
                        a Mac or X terminal with high speed 
                        telecommunication capabilities.

ASV3 will be available September 21st!

If you are interested in obtaining a free ASV3 account, please either:
     - call AdaNET Client Service (800) 444-1458
 or  - send me an email (gunawan@ece.wvu.wvnet.edu) and include your
       address, so we can send you an application.
From: deatrick@sdfvax.rc.trw.com ("Will Deatrick, 592-7332, RC7/1564")
Newsgroups: comp.lang.ada
Subject: LabView on the Mac with Ada
Date: 28 Aug 92 17:27:00 GMT
Organization: The Internet

We are looking at using LabView II on a Mac to create a demo
for an antenna subsystem, and we will have to interface some of our own 
Ada code with LabView II.  LabView supports interfacing to user-written
C code, but the company tech reps say we may have problems with Ada.
I don't understand the nature of the incompatibility yet, but I was told
it has to do with register usage, and the fact that the Meridian compiler 
does not produce a "code resource".  BTW, Alsys no longer markets their 
Mac Ada compiler, and we can find no other Ada compiler vendors for the Mac.

My questions are:

1) Has anyone used Lab View II on the Mac with user-written Ada code?

2) Does anyone else (beside Meridian) market an Ada compiler for the Mac?

Thanks,

Will Deatrick
deatrick@sdfvax.rc.trw.com

Newsgroups: comp.lang.ada
From: rhyspj@occs.cs.oberlin.edu (Rhys Price Jones)
Subject: Soliciting names for ACM/SIGCSE panelists
Organization: Oberlin College Computer Science
Distribution: comp
Date: Wed, 2 Sep 1992 22:15:36 GMT
X-Posted-From: occs.cs.oberlin.edu
X-Posted-Through: sol.ctr.columbia.edu

I am looking for participants in a panel discussion  for next year's
SIGCSE to discuss issues affecting choice of language in CS1 - the
introductory CS course.  Please e-mail me suggested names for
advocates of your particular favorite introductory language.

Thanks

--
Rhys Price Jones                            
Cyd-athro Cyfrifiaduriaeth                   ____
Associate Professor Computer Science        /   / /
Oberlin College                            /   / /
King 223C                                 /___/ /__      __
Oberlin OH 44074 - USA - UDA             / \   /  / / / (
(216) 775 8697                          /   \_/  /_/_/ __)
<rhyspj@occs.cs.oberlin.edu>                      __/_/
Newsgroups: comp.lang.ada
From: ae@sei.cmu.edu (Arthur Evans)
Subject: Re: ADA question
Organization: Software Engineering Institute
Date: Thu, 27 Aug 1992 13:39:57 GMT

Several folks have responded to the request about how to deal with a
function that returns a string.  In general such functions are hard to
deal with, and better design is usually to adopt another approach.  Note,
for example, how the Ada design specifies Text_IO.Getline in 14.3.6(12).
(The first time I tried to use Text_IO.Name (ARM 14.2.1(20)) I had all
the troubles the original poster had.)

If you are stuck with the string-returning function, you might declare a
type that is an access to a string (that is, a pointer to a string) and
store the string into a variable of that type.  It might look something
like this, assuming that Get_It is the string-returning function:

    declare
	type AString is access string;	-- pointer to a string
	String_Val: AString;		-- variable to hold pointer
    begin
	...
	-- Get the string, and create a new place to store it.
	String_Val := new string'(Get_It(...));
	... String_Val.all ...		-- reference to the string
	...

    end;

Good luck!

Art Evans
----------------------------------------------
Arthur Evans, Jr, PhD           Ada Consultant
461 Fairview Road
Pittsburgh PA  15238-1933
412-963-0839
ae@sei.cmu.edu
From: zetocha@uservx.plk.af.mil
Newsgroups: comp.lang.ada
Subject: Looking for Parallel Ada Compilers
Date: 2 Sep 92 13:11:44 GMT
Article-I.D.: uservx.1992Sep2.131144.36039
Organization: Phillips Laboratory - Kirtland AFB


    I am working on developing a parallelized R&D environment for 
parallel processing computers, and I'm trying to determine what 
parallelizing Ada compilers are on the market.  Initially I am
interested in parallel Ada compilers for the Silicon Graphics
4D/340 computer.  Can anyone point me in the right direction?
Thanks in advance.

Paul Zetocha
Air Force Phillips Lab
zetocha@uservx.plk.af.mil
From: gt1827a@prism.gatech.EDU (david daniell)
Newsgroups: comp.lang.ada
Subject: Re: FAQ: Ada ftp sites
Keywords: Ada
Date: 28 Aug 92 14:00:00 GMT
Distribution: usa
Organization: Georgia Institute of Technology

In article <2A9CFC5D.4753@deneva.sdd.trw.com> adams@pooh.sdd.trw.com (allen Adams) writes:
>Could some one point me in the direction of where there are Ada reusable 
>software available through ftp sites.

The SIMTEL20 ftp site (WSMR-SIMTEL20.ARMY.MIL; IP host 192.88.110.20) has the
directory PD7:<ADA>, which, according to SIMTEL20:
     "The <ADA> archive is growing rapidly.  Information about 
      this archive is in directory PD7:<ADA.GENERAL>.  In general,
      the archived software is very good, having been worked-over
      and refined by many users.  The documentation and comments
      tend to be complete and informative."
You can get a directory listing by connecting to SIMTEL20 via FTP and getting
the file PD7:<ADA>ADA.CRC.

These files are also mirrored at various ftp sites, the most-up-to-date of 
which is probably OAK.OAKLAND.EDU (141.210.10.117).  Look for a MIRRORS 
directory there.

Hope this helps out.

-- 
David Daniell
Georgia Institute of Technology, Atlanta Georgia, 30332
uucp:	  ...!{decvax,hplabs,ncar,purdue,rutgers}!gatech!prism!gt1827a
Internet: gt1827a@prism.gatech.edu
From: deatrick@SDFVAX.RC.TRW.COM ("Q921 088195 WILL L DEATRICK")
Newsgroups: comp.lang.ada
Subject: Re:Ada Source Module Configuration
Date: 25 Aug 92 20:40:00 GMT
Distribution: world
Organization: The Internet

> Can anyone point me to references on configuring Ada source
> module hierarchies/dependencies/architectures?  I can't help
> but think there's a better way to do this stuff.

Some comments and guidelines that may be of interest to you were
presented at Tri-Ada '91 in "Large Development Teams and the Ada
Library or Who Recompiled the #%$@!& Ada Library" by Chase Dane.

The paper is in the Conference Proceedings, and the ACM number
is 0-89791-445-7/91/1000-0301 ($1.50).  I don't have an electronic
version of it to email (sorry).

Will Deatrick
deatrick@sdfvax.rc.trw.com

Newsgroups: comp.lang.ada
From: jjh@evb.com (John Halper)
Subject: Re: ADA question
Organization: EVB Software Engineering, Inc.
Date: Thu, 27 Aug 1992 00:42:28 GMT

Daljeet writes:

>I am beginning to learn Ada and am stuck at a point. The question is as
>follows:
>
>I have a function in a package A which returns string. I am using
>that function in another package B and try to give the value returned
>by that function to a variable (which has been declared in package B).
>The variable is of type string (1 .. max) initialised to empty string.
>My program simple raises an exception. 
>Could it be that the array size is different for the variable and the value
>returned by the function. The function can return a string of different
>sizes. Can somebody give help me out?


I will assume that for whatever reason, you are stuck with package A and
can not rewrite the function as a procedure as per the suggestion of many
others.  The solution given by Andrew Dunstan:



   declare
      string_res : constant string := my_string_function;
   begin
      process(string_res);
   end;



would be my next choice.  This is a slick answer and one I would have never
thought of on my own.  Thanks.

Given that I was not allowed to use either of the above, IMHO better solutions, 
how about the following:


   declare 
      String_Res : string (1..My_String_Function'length) := My_String_Function ;
   begin 
      Process (String_Res) ;
   end ;


I don't like making the call twice, and would rather use one of first two 
solutions, but ...


John Halper 
EVB Software Engineering, Inc.
1 800 877 1815
jjh@evb.com
It would be presumptuous of me to even assume the company would want my opinions
-- 

John Halper
halper@evb.com
From: elliottm@beach.csulb.edu (Mike Elliott)
Subject: pragma INTERFACE to MTH$RANDOM in DEC ADA?
Organization: Cal State Long Beach
Date: Wed, 2 Sep 1992 10:28:20 GMT

I've gotten stuck trying to interface to the VMS math library routine
MTH$RANDOM, which takes the address of an integer seed as its argument, and
returns a FLOAT.  Ada rightly complains if I declare my routine as a function
taking an in out INTEGER parameter, but my other attempts to trick DEC ADA into
iterfacing to this routine have also failed.  They include

   1) declaring the function to take a parameter of type access INTEGER, which
      points to an actual intger which can be changed (the INTEGER pointed to
      remains immutable),

   2) declaring the function to take a parameter of type SYSTEM'ADDRESS, and
      passing it the address of some integer (the INTEGER at said address
      remains stubbornly unchanged).

I'm sure there's some way to do this, but my only two DEC ADA manuals shed no
light on how.  They do illustrate how to interface to routines like MTH$SQRT,
which rightly take a parameter of type in FLOAT, and these attempts have been
successful. 
-- 


                                           Mike Elliott
                                           elliottm@beach.csulb.edu
Newsgroups: comp.lang.ada
From: remacle@software.org (Patricia Remacle)
Subject: Ada/Reuse Survey
Organization: Software Productivity Consortium, Herndon, Virginia
Date: Wed, 2 Sep 1992 19:41:30 GMT


The Software Engineering Ada Lab at NASA Langley will be conducting a survey on the use of Ada on NASA projects and the current state of software reuse.   If you are/were a software project manager for a NASA project (either in-house or out-house) and would like to participate in this survey please forward your name and address to:  remacle@eagle.larc.nasa.gov

     Thanks,
       Tricia

-----
Patricia Remacle
(804) 864-6550

Newsgroups: comp.lang.ada
From: ucaa2385@ruscvx.rus.uni-stuttgart.de (Peter Hermann)
Subject: Re: ADA question
Organization: User ruscvx Comp.Center (RUS) University of Stuttgart, Germany
Date: Thu, 27 Aug 1992 10:29:51 GMT

In article <1992Aug27.004228.19551@evb.com> jjh@evb.com (John Halper) writes:
>Daljeet writes:
>>I have a function in a package A which returns string. I am using
>>that function in another package B and try to give the value returned
>>by that function to a variable (which has been declared in package B).
>>The variable is of type string (1 .. max) initialised to empty string.
>
>I don't like making the call twice, and would rather use one of first two 
>solutions, but ...

It is advisable to call any function only once
for the same purpose, because a function result
 1. may change from call to call
 2. may be expensive

If and only if you have enough space or your strings
to be processed are small enough, respectively,
then you may code the following:

DECLARE
   String_Const : CONSTANT String := My_String_Function;
   String_Var : String (String_Const'RANGE) := String_Const ;
BEGIN
   Process (String_Var) ; -- parameter's mode: IN OUT
END ;

An advanced compiler may possibly sweat out the extra space
for the constant. Perhaps all compilers of the next generation
are apt enough?

After all, I hope that Ada9x relaxes the situation anyway,
in that a declaration like
   String_Var : String := My_String_Function;
will become valid. This would create a constrained array
by inspection of the initialization value.

regards,
Peter Hermann
Newsgroups: comp.lang.ada
From: pat@summit.opus (pat gioannini)
Subject: Re: ADA Max Array Size HELP!!!!
Organization: /home/pat/.organization
	<1992Aug25.114344.27981@relay.nswc.navy.mil>
Date: Thu, 27 Aug 1992 15:23:51 GMT


>One possible limit on array size is stack space.  I don't know about
>other systems, but on an SGI with a Verdix compiler, statically declared
>arrays are put on the stack.  An array of 512x512 may be to much for
>the stack to handle.  Solution?  Dynamic allocation by way of access 
>types and the array will be put on the heap.


Alsys has a flag you can set which cause object greater than 
a specified size to be declared on the heap.

--
pat gioannini
pat@psl.nmsu.edu

From: stt@spock.camb.inmet.com
Date: 28 Aug 1992 21:43 EDT
Newsgroups: comp.lang.ada
Subject: Re: Ada9X generic formal packages
Message-ID: <20600140@spock>
Nf-ID: #R:ut-emx.uucp:78322:spock:20600140:000:997
Nf-From: spock.camb.inmet.com!stt    Aug 28 21:43:00 1992



In article <78322@ut-emx.uucp> 
  hasan@emx.cc.utexas.edu (David A. Hasan) writes:

>I have a question regarding the use of generic formal
>packages in Ada9X.
>
>Suppose that there already exists a package <g1> in the
>library and that I want to "include" this generic package
>in the list of generic formals for a second generic package,
><g2>:
>
>     GENERIC
>       ...
>       WITH PACKAGE p1 IS NEW g1(<>);
>     PACKAGE g2 IS
>       ...
>     END g2;
>
>My question is this:
>
>Do I have to provide a "WITH g1;" in the context clause
>for <g2>? 

Yes.  The name of another library unit is never visible unless
it is "with"ed.  By the way, it wouldn't surprise me if
an example in the Ada 9X Mapping Rationale left off such a "with"
clause.

>--| David A. Hasan   University of Texas at Austin
>--|                  Center for Space Research
>--|                  hasan@emx.cc.utexas.edu

S. Tucker Taft   stt@inmet.com
Ada 9X Mapping/Revision Team
Intermetrics, Inc.
Cambridge, MA  02138
From: masticol@cadenza.rutgers.edu (Steve Masticola)
Newsgroups: comp.lang.ada
Subject: Re: Problems with the Ada grammar from primost.cs.wisc.edu
Keywords: acvc, lexer and parser
Date: 31 Aug 92 19:43:40 GMT
Organization: Rutgers Univ., New Brunswick, N.J.

Shirish, 

Sorry about posting to reply, but mail to you bounced.

Could you please let me know which of the "A" tests failed? Or better
yet, send me a copy. I'm not the author of the Ada grammar on primost,
but I sent it in to comp.compilers.

Thanks,
- Steve (masticol@cs.rutgers.edu).
Newsgroups: comp.lang.ada