HDTenEightyP/NetNews huggingface dataset:
From: jam@jeol.com
Subject: Re: ADA question
Keywords: Strings, Packages
Organization: JEOL USA, Inc.
Date: Sun, 23 Aug 1992 21:41:27 GMT

In <1992Aug23.102056.19487@alf.uib.no> sahni@eik.ii.uib.no (Sahni Daljeet Singh) 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?

You are correct, the strings must be of the same size...  There are
various ways that you can solve this problem.  For example :

o.  Make a subtype that the function returns and the variable can be 
	declared with.
	subtype MY_STRING is STRING(1..max);
	...
	x : MY_STRING;
	...
	x := the_func( whatever );
	...
o.  Make a function/procedure which the result of the first function is 
	passed to and then deal with the result.
	procedure MY_PROC( value : STRING ) is
	begin
	    -- do something with value
	    -- 'first, 'last, 'range, 'length will all work on value.
	end MY_PROC;
	....
	my_proc( my_func( whatever ) );
	...
o.  Change the function to a procedure which then returns the size to the
	user.
o.  It you need variable length strings, look in the library for a VSTRINGS
	package that might make the problem a lot easier.  VERDIX supplies
	one.  Basically a record containing a string and a length, often times
	dynamic to allow for widely sized strings.  

Good luck, If none of these help then define your problem more exactly.

-- 

                John Malcolmson      
                (malcolmson@jeol.com)
Newsgroups: comp.lang.ada
Subject: ADA Max Array Size HELP!!!! REVISITED
From: mgeorgy@vmsclst1.sc.csupomona.edu
Date: 25 Aug 92 12:13:12 PDT
Organization: Computer Science Computational Systems
Nntp-Posting-User: mgeorgy

Well the programs kicks after compilation, linking, and running.  It looks like
its about to go then kicks before the first statment in the program.  I have
tried this on a VAX and a MAC with approx 20 megs of RAM 2 of which is soely
dedicated to the programming environment...  Both times it kicks.  This is why
I think it may be the amount of memory available to the program, because it
crashs when it seems to be allocating that amount of memory!!!


What d'ya think,
Matt Georgy
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+When It Absolutely, Positively, Has To Be Taken Out Overnight!!!+
+                                                                +
+                                           -- Team Stealth      +
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
From: tomw@ccadfa.cc.adfa.oz.au (Tom Worthington)
Newsgroups: comp.lang.ada
Subject: DEC HAS APPLIED FOR "DEC ADA" AS A TRADEMARK IN AUSTRALIA
Date: 27 Aug 1992 07:55:47 GMT
Organization: Australian Defence Force Academy
NNTP-Posting-Host: ccadfa.cc.adfa.oz.au

The Australian Patient Trademarks and Designs office has
confirmed that Digital Equipment Corporation have applied for
the term "DEC ADA" to be registered in Australia as a
trademark (Trademark Number: 550642). The application has been
accepted and the public has until 9 October 1992 to register
any objection to this.

I have some concerns that such a trademark will weaken the
strong standardisation which currently exists with Ada
compilers. Is it a common practice, legal and appropriate for
computer companies to register trademarks of this type? Has
this been done for other Ada products or in other countries?
Do other IT practitioners share my concern over this?


Tom Worthington
Chairman 
THE CANBERRA BRANCH OF 
THE AUSTRALIAN COMPUTER SOCIETY INCORPORATED
G.P.O. Box 446
Canberra A.C.T. 2601
Australia

Ph:  +61 6 247 4830
Fax: +61 6 249 6419 
E-Mail: tomw@adfa.oz.au

27 August 1992
From: andrewd@cs.adelaide.edu.au (Andrew Dunstan)
Newsgroups: comp.lang.ada
Subject: Re: Could you forward this to Comp.Lang.Ada
Date: 1 Sep 92 02:58:41 GMT

In article <9208311113.AA21505@cs.NYU.EDU>, dewar (Robert Dewar) writes:
|> Andrew Dunstan writes:
|>  "Thanks for pointing this [the rule in 13.5(8)] 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."
|> 
|> Well the RM takes many knocks, some deserved, but really! this is somewhat
|> unfair. If I was wondering about the use of an address clause in Ada, I
|> should think I would read section 13.5 of the reference manual, whose
|> title is, reasonably helpfully "Address Clauses". Since this section is
|> quite short (only 21 lines long plus a short example and a note), it would
|> seem quite reasonable to read the full 21 lines. 3 of these lines (a
|> separate paragraph, para (5), contain the restriction stated pretty clearly:
|> 
|>   "Address clauses should not be used to achieve overlays of objects or
|>    overlays of program units. Nor should a given interrupt be linked to more 
|>    than one entry. Any program using address clauses to achieve such an 
|>    effect is erroneous."

Ok, my face is bright red! I looked at 13.1 and missed the reference to 13.5.


|> 
|> One final note, back to the original problem. The best general solution is
|> to use access STRING for these kind of situations. Actually access STRING
|> is a pretty reasonable type for the manipulation of variable length strings.
|> Of course it means using the heap which you might want to avoid, but in that
|> case, worry a little about using unconstrained returned values from functions
|> at all -- many, but not all, implementations secretly use the heap anyway
|> for this situation. So if you are writing portable code which wants to avoid
|> using the heap, better to use an interface like GET_LINE, even if it is
|> clunkier!

I have made the point to several people that using an access to string type
is what I would do myself, but that I have seen code which does use
address clauses to do what I suggested, notwithstanding that it is
erroneous.

-- 
#######################################################################
#  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: SAHARBAUGH@ROO.FIT.EDU
Newsgroups: comp.lang.ada
Subject: Only 20K expressions, I'm shocked!
Date: 28 Aug 92 02:16:00 GMT
Distribution: world
Organization: The Internet

James Vera writes:
>The problem is not the case statement, per se.  Instead the problem is
>that Verdix has a hard limit on the number of expressions which can
>occur in a subprogram.  The limit is something like 20,000
>expressions.

>To get around this bug, you need to break the offending subprogram
>into multiple subprograms.  This, of course, is a pain in the but when
>the subprogram is generated automagicly but gee, you don't expect >your
>Ada compiler to compile valid Ada code, do you?

   Is this a typo? 20K expressions must be about
5 boxes of cards (2000 per box as I remember).  Does
your computer center allow you to submit jobs
that big?  You know the chances of the operator
dropping some of those or mixing them up is very
high.  Here's a helpful hint:  Various color
cards are useful for partitioning the subprogram.
I used to use yellow for data, red for code
and green for system statements, except that the
job card was plain, with the school logo on it.
I then took marker pen and marked the edges with
the name of program segments in large letters.
Of course that was the early 60's.  A fellow
student also carried big decks of cards around
and mumbled something about modularity.  His
name was Dave Parnas but neither he nor I
was ever able to achieve a 10K card subprogram,
Wow!  I bet that our old 20 GATE or IPL V
compilers wouldn't have handled that either. 
I therefore conclude that very little progress
has been made on the compiler front since 1964.
sam harbaugh
--- p.s. I have really enjoyed writing this.
Newsgroups: comp.lang.ada
From: remacle@software.org (Patricia Remacle)
Subject: Project Management with Ada
Organization: Software Productivity Consortium, Herndon, Virginia
Date: Wed, 2 Sep 1992 18:10:57 GMT


I'm working on an Ada Software Development Handbook and am looking for two things.  One, any literature references for articles that describe what is unique about managing a software project using the Ada language (besides the fact that your sizing, cost and schedule estimates will be based on data related to Ada projects).  The other request is any information about project management tools geared toward Ada (we have REVIC).  You can send responses to ...
       remacle@eagle.larc.nasa.gov

         Thanks,
             Tricia
From: erickson@taurus.cs.nps.navy.mil (David Erickson)
Newsgroups: comp.lang.ada
Subject: Mixing Ada and C modules
Date: 3 Sep 92 00:34:06 GMT
Reply-To: erickson@cs.nps.navy.mil (David Erickson)
Organization: Naval Postgraduate School, Monterey CA

I wish to write a module in Ada which dovetails into an existing program
written in C.  The compiler I am using (Meridian, Sun 4) supports pragma 
interface(C,...), and it is capable of producing intermediate C code.

If anyone has done something similar, and has some suggestions about how
to proceed, and what problems I will run into, I would appreciate hearing
from you.


More details:  the set of C modules is an operating system simulator and
project generator.  I plan on using it for my introductory operating
systems course.  Students will have to write a module in Ada, which will
be linked to the remaining modules to form a complete operating system,
then the simulator will test the result.  I have a complete set of
specifications for the C functions that should be in each module, and
the intermediate code will have to conform.

-Dave Erickson

Computer Science Dept.
Naval Postgraduate School
Monterey, CA
From: anderson@bigun.enet.dec.com (Keith J. Anderson)
Newsgroups: comp.lang.ada
Subject: Trademarking product names with Ada in them?
Keywords: Ada, trademarks, ethics
Date: 27 Aug 92 17:58:29 GMT
Organization: Digital Equipment Corporation (Australia)

There seem to be many products containing the word Ada in a trademarked product
name. Yet I heard a complaint from someone in the Australian Computer Society
that said that no vendor should attempt to trademark any product name
containing the word Ada.
1. how many products have a trademarked name containing the word Ada?
2. what are the guidelines around trademarking product names containing the
word Ada? What is ethical behaviour that the AJPO would not frown on?

I had the impression that since Ada was no longer trademarked by the AJPO, that
meant it could be used in trademarked names.

Keith
-------------------------------------------------------------------------------
EM: anderson@bigun.enet.dec.com		Keith J. Anderson
or  anderson%bigun.enet@decwrl.dec.com	CASE and Information Management  
Phone: (+61 6) 2754800			Digital Equipment Corp (Aust) P/L
FAX  : (+61 6) 2473654			7 Barry Drive, Turner ACT 2601 AUSTRALIA
X.400: c=au;a=otc;p=digital;o=digital;ou=sno;s=anderson;g=keith
***** My words are not those of my employer *****
Newsgroups: comp.lang.ada
From: simonson@cs.washington.edu (Kevin Simonson)
Subject: Reducing Size of Files with direct_io
Summary:  How do you decrease the size of a file?
Keywords: direct_io reducing size
Organization: Computer Science & Engineering, U. of Washington, Seattle
Date: Fri, 28 Aug 92 19:10:59 GMT

     With package "direct_io" (dealt with on pages 14-7 to 14-9 of the
LRM), any element of a file can be modified in any way, additional elements
can be added onto the end of the file, and in addition to this the file can
even be deleted.

     It strikes me as being a very flexible way to handle a file, but
there is one feature that it seems to lack.  The size of the file can be
increased by writing past the end, but I can't find any way to DECREASE
the size of the file, without outright deleting it.  Does anyone know how
such a thing could be accomplished?  Thanks in advance.

                                     ---Kevin Simonson
From: mlc@IBERIA.CCA.CR.ROCKWELL.COM ("Michael Cook, x2792, 124-211")
Newsgroups: comp.lang.ada
Subject: Ada syntax poster
Date: 28 Aug 92 12:40:15 GMT

I recall seeing the availability of a wall poster with Ada syntax
diagrams on it.  These diagrams are the "rail-road" syntax
diagrams, similar to Wirth's Pascal diagrams.

Is this poster available, and if so, from whom and for how much?

Thanks,

Michael Cook
Internet: MLC@IBERIA.CCA.CR.ROCKWELL.COM
These are not the opinions of my employer.
From: SAHARBAUGH@ROO.FIT.EDU
Newsgroups: comp.lang.ada
Subject: MI, a hope for Automatic Test Equipment
Date: 25 Aug 92 11:07:00 GMT
Distribution: world
Organization: The Internet


Bob Crispen writes, in part:
>email to me if you
>think that there is a domain in which MI is both a natural part of a
>domain-specific software architecture and a safe and effective >technique
>(e.g., system integration or component debug took *less* time than
>previously).

   I have hopes but nothing that matches the past tense "took"
in your request.  Here it is for comment anyway.

   I am doing work on the IEEE standard "Ada Based Environment
for Test".  It is definitely a DSSA, where the domain = Automatic
Test Equipment (ATE).
  The hope is that test objects can be utilized to reduce the cost
of producing Test Program Sets (TPS's).  NCR reports a 5:1
productivity in using an object-oriented approach.  I don't
know if it involved MI or not.
  I could imagine a scenario where I needed to create a TPS
for a PC clone.  I would derive my TPS from a test object
class named PC_Test_Program_SET and turn off any methods
that didn't apply to the particular PC I need to test (e.g.,
turn off the tests for hard disks if my PC didn't
have a hard disk).
  I further imagine that the PC_Test_Program_Set object
would inherit the PC_motherboard_Test_Program_Set and I
would have to communicate that I want to use the method
for a 486DX cpu and the methods for other CPU's would
not be utilized.
  I would further imagine that the PC_Motherboard_Test_Program_Set
would utilize a 486DX_Test_Program_Set from Intel which would
include methods for 30MHZ, 50Mhz etc. and that I would have
to state my clock rate and that this would be communicated
somehow up 2 levels to the Intel test object.
  This is all a dream so far BUT if it is off base, unachievable
etc. please say so and why.
  No small consideration is that the test system must be
implementable in Ada.  I suspect there is no use to
consider Ada83 but rather look forward to Ada9X objects.
If Ada9X objects don't allow multiple inheritence then
the above inheritance will have to be programmed somehow.

   I have sent this to Bob who may put it in perspective
when he summarizes the replies.

sam harbaugh saharbaugh@ROO.FIT.EDU        
-----------
From: vincens@ens.fr (Pierre VINCENS)
Newsgroups: comp.lang.ada
Subject: Re: Alsys compiler question
Date: 28 Aug 92 07:25:36 GMT
Reply-To: vincens@ens.fr
Organization: Groupe de BioInformatique de l'Ecole Normale Superieure, Paris, France

Hello,
 
I use Alsys compiler on Sun Workstation. The pragma EXPORT allows an 
OBJECT defined in ada to be visible to external programs written in
the specified language. The pragma CALL_IN is used to indicate that an ada
SUBPROGRAM can be called from another language. 

Replace the line:
  pragma EXPORT (C, HI_THERE);
by
  pragma CALL_IN (C, HI_THERE);

Best regards,

Pierre Vincens

E-mail: vincens@wotan.ens.fr
        vincens@FRULM63.bitnet
From: holmes@cs.umd.edu (Holmes S. Liao)
Newsgroups: comp.lang.ada
Subject: Re: Is there a Public Domain/Share Ware ADA compiler/environment available
Date: 3 Sep 92 02:01:14 GMT
Organization: U of Maryland, Dept. of Computer Science, Coll. Pk., MD 20742

In article <3510@babcock.cerc.wvu.wvnet.edu> smp@cathedral.cerc.wvu.wvnet.edu (Shailesh M. Potnis) writes:
>
>	I guess that the title says it all.  I am looking for an ADA compiler
>or an integrated development environment in PD or share ware.
>
>	All comments and suggestions are highly appreciated.


Thanks to Prof. Feldman. Here it is:


1. INTRODUCTION.

This file is the README file from the distribution of Ada/Ed version
1.11.0a-PC, an Ada interpreter for 386/486 machines running MS-DOS/PC-DOS.
The distribution consists of one directory packaged into a compressed
tar file available through anonymous ftp on cs.nyu.edu (128.122.140.24)
in the directory pub/adaed.  The distribution contains sources and
executables.  The ftp directory contains another distribution for
Unix-based machines.

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Purpose License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version. See relevant excerpts below.

[rest deleted]

//hs

Newsgroups: comp.lang.ada
From: vera@fanaraaken.Stanford.EDU (James S. Vera)
Subject: Re: Lex and Yacc for Ada
Organization: Program Analysis and Verification Group, Stanford University
Date: 27 Aug 92 08:30:08 GMT

dymm@cards.com (David Dymm) writes:

>Does anyone know where I can get versions of lex and yacc for
>Ada?  I have versions for C, but in my organization, I am
>requried to write code in Ada, not C.

The Arcadia project at the University of California at Irvine has
developed ada versions of yacc (ayacc) , lex (alex) and flex
(aflex). I don't have an address for them off hand but a couple of
phone calls should track them down.  Or an archie search would
probably give you a couple of hits.

James S. Vera      |         Internet           |Standard Disclaimers
Stanford University|   vera@anna.stanford.edu   |Blah Blah Blah Blah
+1.415.723.1089    |    FAX +1.415.725.7398     |
From: mfeldman@seas.gwu.edu (Michael Feldman)
Subject: Re: ADA question
Keywords: Strings, Packages
Organization: George Washington University
Date: Sun, 23 Aug 1992 20:58:10 GMT

In article <1992Aug23.102056.19487@alf.uib.no> sahni@eik.ii.uib.no (Sahni Daljeet Singh) 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. 
That would be Constraint_Error.

>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?
You are correct. A string is just a special case of an unconstrained array
type. One of these can be assigned to another as long as the lengths
match. If you can find the length of the string, you can use a slice
to store the value returned by your function.

Mike Feldman
------------------------------------------------------------------------
Michael B. Feldman
co-chair, SIGAda Education Committee

Professor, Dept. of Electrical Engineering and Computer Science
School of Engineering and Applied Science
The George Washington University
Washington, DC 20052 USA
(202) 994-5253 (voice)
(202) 994-5296 (fax)
mfeldman@seas.gwu.edu (Internet)

"Americans wants the fruits of patience -- and they want them now."
------------------------------------------------------------------------

Newsgroups: comp.lang.ada
From: drew@verdix.com (Drew Johnson)
Subject: Re: Need new idea to get around sunada 1.0 [Verdix] error
Organization: Verdix Corp.
Date: Thu, 27 Aug 1992 13:04:56 GMT

In article <vera.714899225@fanaraaken.Stanford.EDU> vera@fanaraaken.Stanford.EDU (James S. Vera) writes:
>Ack!  The old Verdix bug.  Our group first complained about that bug
>half a DECADE ago.  Bug progress has been made.  Instead of barfing up
>with an assertion error, Verdix is instead (in some future, unnammed
>release) going to issue a standard error message.  Big improvement.

We have since decided to make some changes (but the error message will
still get put in too).

>
>The problem is not the case statement, per se.  Instead the problem is
>that Verdix has a hard limit on the number of expressions which can
>occur in a subprogram.  The limit is something like 20,000
>expressions.
>
>To get around this bug, you need to break the offending subprogram
>into multiple subprograms.  This, of course, is a pain in the but when
>the subprogram is generated automagicly but gee, you don't expect your
>Ada compiler to compile valid Ada code, do you?

It comes down to "how big is too big?"  We used to think that subprograms
like this were "too big".  We are revising this because it is apparent
that this is not the case.  Unfortunately, there is always going to be
a limit to the size of a single body of source that the compiler will
accept.  What will this limit be?  Well, this is difficult to translate
into lines, because a single line can be very complex or very simple.
Right now, I can only tell you that it will be substantially increased
in the next version of the compiler (6.2 for most platforms, SunAda 2.0
for Suns).  Does this mean your code will now compile?  I don't know, because
I don't know just how far over the limit you were.  You might still be
over the new limit.  This is doubtful, but possible.

>I've pointed out this Verdix debility to the AYACC folk and they said
>they'll look into it.  I'd put money on it that the AYACC folk code
>around Veridex's bug before Veridex fixes it.

Well, we will have beta compilers in the field with this fix in about
a month (less for some platforms).  It would still be a good idea for
AYACC to break up huge subprograms, because even though we will accept
larger ones with 6.2, it is going to be a huge resource sink.  I suspect
that if you compiled this same code with other compilers, you will find
the same thing.

Drew Johnson, QA Manager
Verdix
drew@verdix.com
From: ov@saturn.cs.swin.oz.au (Owen Veenstra)
Newsgroups: comp.lang.ada
Subject: comp.lang.ada
Date: 23 Aug 92 23:22:11 GMT
Organization: Swinburne Institute of Technology, Hawthorn, Victoria


   I am a student undertaking the last year of Software Engineering degree at
Swinburne University (no longer an institute) in Victoria, Australia.  Ada is 
an intergral part of this course, being taught everything from basics
to run-time development using concurrency.

   In M Feldmans last posting he says that "... Ada has become an integral
part of many computer science programs...".  My question is this :-

   With the exception of DOD contracts, has Ada been used (to a large degree)
in any other projects.  I know of three companies only (in Australia) that
uses Ada to and large degree, and all of those are involved in military
contracts.  Also, would anyone out there be prepared to command on how
good or bad Ada is for use in prototyping.  I personally reckon that it's
great, but I am only a student yet to see any use of Ada in a project lasting
more that about 9 months.

    Any reply would be appreciated; you have my thanks in Advance.

    If, for some reason, persons do not want to reply on news, my email address
 is :-


        ov@saturn.cs.swin.oz.au   



                                   Many thanks,

                                   Owen