HDTenEightyP/NetNews huggingface dataset:
From: maxtal@extro.ucc.su.OZ.AU (John MAX Skaller)
Subject: Re: Renew?
Organization: MAXTAL P/L C/- University Computing Centre, Sydney
Date: Tue, 28 Jul 1992 18:29:21 GMT

In article <23315@alice.att.com> ark@alice.UUCP () writes:
>If I write a copy constructor in my class, I expect that constructor
>to be called when an object of that class is copied.  Period.

	Ah, but often it isnt---the assignment operator is called
instead :-)

>
>>   Why not have ANOTHER special method (in addition to copy
>> construction, deletion and assignment) which is only called when an
>> object is being MOVED from one memory location to another?
>
>That is much too much added complexity for one special case.  I can
>confidently guarantee that if such a feature were added, the majority
>of C++ programs would either misuse it or forget to use it altogether.

	Why? It could default easily. And it could be useful
when memory compacters were required.  It could be used
whenever a temporary was copied that was about to evaporate.

	Mm. Anyone with a solid cost/benefit analysis?
-- 
;----------------------------------------------------------------------
        JOHN (MAX) SKALLER,         maxtal@extro.ucc.su.oz.au
	Maxtal Pty Ltd, 6 MacKay St ASHFIELD, NSW 2131, AUSTRALIA
;--------------- SCIENTIFIC AND ENGINEERING SOFTWARE ------------------
Newsgroups: comp.lang.c++
From: friedric@kirk.fmi.uni-passau.de (Carsten Friedrich)
Subject: atexit, signal, ....
Keywords: atexit signal
Organization: University of Passau, Germany
Date: Tue, 21 Jul 1992 20:02:27 GMT

hi,

i don't know if my questions belong to comp.lang.c++ or comp.lang.c,
as they are both standart c, but compiled with g++.
so i'm posting it to both. hope you forgive me.

1) in my program i'm waiting for a child to exit:

void ttt()
{
	do_something();
}	

.
.
signal(SIGCHLD, ttt);
.
.

after do_something() my parent process terminates, but as far as
i understood the man-pages, it should continue, where it was
interrupted before :(. can anyone tell me what i'm doing wrong ?

2.) K&R and stdlib.h say there is a function called atexit. but
	my linker complains that there isn't. any ideas ???

i'm using g++ version 2.0 to 2.2

	greetings,
		carsten

friedric@kirk.fmi.uni-passau.de
friedric@forwiss.uni-passau.de

Newsgroups: comp.lang.c++
From: shang@corp.mot.com (David (Lujun) Shang)
Subject: Re: Language extensions for run-time type identification
Reply-To: shang@corp.mot.com
Organization: Motorola, Inc., Software Research and Development, Rolling Meadows, IL. 60008
Date: Fri, 24 Jul 92 13:37:12 GMT

In article <1992Jul23.200803.22371@ucc.su.OZ.AU> maxtal@extro.ucc.su.OZ.AU  
(John MAX Skaller) writes:
> 	IMHO making struct == class (baring access defaults) was a poor
> decision. I would much rather 'struct' MEANT C-compatible. 
> 

I couldn't agree more. Making struct == class brings about a big obstacle to  
explore further the concept of class. Structure should not have the inheritance  
hierarchy, otherwise we make a great trouble in trading off between the  
C-compatible struct and the class-equivalent struct when the class concept  
should be enhanced in C++.

David Shang
Newsgroups: comp.lang.c++
From: kenk@sdc.com (Ken Konecki)
Subject: Trouble with pragmas and vfork on Sparc
Organization: Systems Development Corporation
Distribution: na
Date: Thu, 30 Jul 1992 16:38:34 GMT

According to the man page for vfork:
    "On Sun-4 machines, ...,  the  file  <vfork.h>  must  be included in
    programs that are compiled using global optimization."

<vfork.h> contains the following:
    #ifdef sparc
    #pragma unknown_control_flow(vfork)
    #endif

The compiler expects the parameter to unknown_control_flow to be an
already existing symbol.  The problem is that C++ doesn't add the extern
until it finds a function that uses it, which is always after the pragma
is parsed by the C compiler.  Since vfork has not yet been added as a
symbol, the C compiler spits out a warning to the tune of "function name
expected"

Here is some example C++ code (for example purposes only):

#include <vfork.h>

main(void)
{
    if (vfork() == 0)
    {
	

    }
}

if you run CC -P on it you get (note the pragma *before* the extern int
vfork):
# 1 "post.c"

/* <<AT&T C++ Translator 2.1.03 08/31/90>> */
/* < post.c > */

# 1 "post.c"
char *__vec_new ();

# 1 "post.c"
char __vec_delete ();
typedef int (*__vptp)();
struct __mptr {short d; short i; __vptp f; };

# 1 "post.c"

# 107 "post.c"
typedef char (*_PFV_ )();
typedef int (*_PFI_ )();

#pragma unknown_control_flow(vfork)

# 129 "post.c"
extern int vfork ();
extern struct __mptr* __ptbl_vec__post_c_main_[];

# 137 "post.c"
int main (){ _main(); 
# 138 "post.c"
{ 
# 139 "post.c"
if (vfork ( ) == 0 )
# 140 "post.c"
{ 
# 140 "post.c"

# 143 "post.c"
}

# 144 "post.c"
}

# 144 "post.c"
} 

/* this is to link in __head from libC.so for patch version of cfront */
extern struct __linkl *__head;
struct __linkl **__LinkInHead = (struct __linkl **)(& __head );


# 145 "post.c"

/* the end */

Is this really a problem, i.e. is the pragma working the way it's expected
to?  If not, what recourse do I have, other than using fork() instead of
vfork()?

Cheers,
    -Ken K
-- 
Ken Konecki
e-mail:kenk@sdc.com    -or-    ...!uunet!tellab5!sdc!kenk
"I just found out that the brain is like a computer.  If that's true,
then there really aren't any stupid people.  Just people running DOS."
Newsgroups: comp.lang.c++
From: steve@taumet.com (Steve Clamage)
Subject: C++ for VAX/VMS
Keywords: C++, VAX, VMS
Organization: TauMetric Corporation
Date: Fri, 31 Jul 1992 18:26:55 GMT

Some dissatisfaction with Oregon Software C++ for VAX/VMS has been
expressed in this forum.  TauMetric Corporation has placed an
announcement in comp.newprod on the subject.
-- 

Steve Clamage, TauMetric Corp, steve@taumet.com
Vice Chair, ANSI C++ Committee, X3J16
Newsgroups: comp.lang.c++
From: exk11@po.CWRU.Edu (Erik Kangas)
Subject: Re: ".", "->" operators and member data declarations
Reply-To: exk11@po.CWRU.Edu (Erik Kangas)
Organization: Case Western Reserve University, Cleveland, OH (USA)
Date: Wed, 22 Jul 92 21:26:52 GMT


In a previous article, exk11@po.CWRU.Edu (Erik Kangas) says:

>
>   I'm writing a memory management class in borland c++ that has
>access to XMS, EMS and VDISK memory and handles it transparently
>with conventional memory via handles.
>   However, To handle structures in memory, I currently have to 
>set up a number of constants relating to the byte offsets of the
>data in the structure.  Then add the byte offset to the handle using
>an overloaded "+" operator like so...
>
>#define i 0
>#define x 4
>
>struct foo {
>    long ident;
>    char xfer;
>    };
>
>.....
>
>Handle Fooptr = Malloc(sizeof(foo));
>
Handle is a class that contains info about where the data is stored - XMS,
   conventional memory, hard disk, Ems etc.  Malloc is a friend of Handle.
   It allocates memory somewhere for use.  The following operators are
   also overloaded "=" - to assign the value to some memory location
   or get it from some memory location, "+" to add an offset to the
   memory location.  The following line is equivalent to
   *((char *)Fooptr + x) = 'P';  if Fooptr were a normal pointer,  But
   it is actually a class object.

>Fooptr + x = 'P';
>
>......
>
>    I would like to use some operator, ( I know "." is reserved and  "->"
>only returns a pointer to the structure.) that would know the offset of
>"xfer" in structure foo without me having to declare all the defines.
>I should be able to do a "Fooptr.xfer = "P"".
>    Does anyone know of a built in way of transferring these offset values
>and how I could tie them into overloaded operators?
>

I can't use normal pointer casting becuase I must assume that the data the
caller wants is not in conventional memory.  From within the object I
must be able to "discover" the byte offset from the beginning of the 
structure and the variable type (or length) the user wants.

    Eg.  if a statement was "Fooptr.x = 'P'" or something similar, I would
need to find out that ".x" means the 4th byte from the beginning of the
structure and that it is a char.  Now the "." operator cannot be overloaded,
so I'm not sure how to implement such as this.  

>Thank you.
>

-- 
Erik Kangas  
Physics/Math/CompE         "I lift up mine eyes unto the hills whence  
Phone 754-2316              cometh my strength"  Psalms                
Zeta Psi #304               Whereof we cannot speak, Thereof we must be silent.
Newsgroups: comp.lang.c++
From: kgorlen@alw.nih.gov (Keith Gorlen)
Subject: Re: NIH library gone?
Keywords: NIH, class library
Organization: National Inst. of Health, DCRT, CSL
Date: Tue, 21 Jul 1992 13:09:43 GMT

In article <1992Jul15.121149.22974@hemlock.cray.com>, dsf@cray.com (Dan Frankowski) writes:
|> I have the National Institute of Health Class Library (NIHCL) version 3.0
|> and I would like to obtain 3.10, especially the documentation.
|> 
|> The C++ FAQ (thanks Marshall Cline!) says that the NIHCL may be
|> obtained via anonymous ftp from [128.231.128.251] (ns.nih.gov).  I
|> have tried several times over the last couple of weeks and been
|> refused anonymous ftp.  It was always during business hours.
|> 

The correct IP address is 128.231.128.7 (alw.nih.gov).  This should be corrected in the FAQ.


-- 
Keith Gorlen
National Institutes of Health
Bethesda, MD 20892
Phone: (301) 496-1111
FAX: (301) 402-2867
Internet: kgorlen@alw.nih.gov
From: rjbodkin@theory.lcs.mit.edu (Ronald Bodkin)
Newsgroups: comp.lang.c++
Subject: Re: C++ compiler macros
Date: 27 Jul 92 23:31:10 GMT
	<1992Jul23.143046.1098@auto-trol.com>
Distribution: usa
Organization: MIT Lab for Computer Science

In article <1992Jul23.143046.1098@auto-trol.com> davgot@auto-trol.com (David Gottner) writes:
   The ANSI standard specifies that undefined symbols in #if expressions
   get the value 0.

	Which is of _no importance_ since the test is to see whether
the compiler is pre-ANSI!!
		Ron
From: anders@ipcsun3.his.se (Anders Eklund)
Newsgroups: comp.lang.c++
Subject: Good C++ books to students
Date: 28 Jul 92 11:33:03 GMT
Distribution: comp.lang.c++
Organization: University of Skoevde


Hi there,

I'm going to have a course (educate) in C++ starting January 1993.
This course involves students in an undergraduate level and these
students have a fair knowledge of C already. Now I'm trying
to find good literature that can be used in the course.
Does anyone has any suggestion of good literature for this
purpose. I would appreciate any answer. Please also mail me
if you know about literature that has been used and should
absolutely not be used.
 
Thans in advance.

--

 |\/\/\/|
 |      |           -- Anders Eklund  anders@his.se --
 |      |           -- Connectionist Research Group --
 | (o)(o)           -- Computer Science  Department --
 C      _)          -- University of Skovde, Sweden --
  | ,___| 
  |   /        Hi! I'm Bart Simpson, the ultimate sig virus.	 
  /---\      Just throw away your sig and copy this one instead. 
Newsgroups: comp.lang.c++
From: dshaker@qualix.com (Doug Shaker)
Subject: Looking for Adam Blum
Reply-To: dshaker@qualix.com
Organization: QUALiX Group, Inc.
Distribution: usa
Date: Thu, 30 Jul 1992 20:45:07 GMT


I am looking for an email address for
Adam Blum, the author of "Neural Networks
Software in C++".  Any help would be appreciated.

 - Doug Shaker

	voice:	415/572-0200
	fax:	415/572-1300
	email:	dshaker@qualix.com
	mail:	Qualix Group
		1900 S. Norfolk St., #224
		San Mateo, CA 94403


Newsgroups: comp.lang.c++,gnu.gcc,gnu.g++
From: martin@oahu.cs.ucla.edu (david l. martin)
Subject: porting to g++ (from other "dialects")
Originator: martin@oahu.cs.ucla.edu
Organization: UCLA Computer Science Department
Date: Tue, 28 Jul 92 16:09:35 GMT


I am involved in a project in which we need to be able to use g++
(that is, the g++ component of the latest version of gcc) to compile*
existing source code which was developed for a variety of other
leading C++ compilers - including CFRONT, Borland, Zortech, and
Sabre.  I know there are still incompatibilities between g++ and
the other dialects, but I need to know just how bad they are.  For
example, if I take an average body of CFRONT-compilable code, what
percentage of it might be rejected by g++, in the sense of causing
a fatal error?

I would greatly appreciate the benefit of experience from anyone
who's ported to g++ from a different compiler.

(*To be more precise, I won't actually be generating executables from
the source code.  I'll be using g++ as a front-end to analyze
existing source code and produce an intermediate representation which 
describes it - essentially an attributed syntax tree.)

Thanks!

- Dave Martin
Newsgroups: comp.lang.c++,comp.editors
From: xorian@solomon.technet.sg (Xorian Technologies)
Subject: Re: Looking for editors and parsers for C++
Organization: National University of Singapore
Date: Mon, 27 Jul 1992 01:57:36 GMT

Jan Skarvall write :-

: I am also interested in parsers and parser generators for C++ for the same
: reasons.

Our parser generator LADE is able to generate a C++ parser with 0 shift-reduce
and 0 reduce-reduce conflicts.  We are also in the process of writing a C++
parser which will be ready soon.

: We are currently using C++ 2.1.

As far as the parser is concern there is little difference between 2.1 and
3.0, since template and exception handling has more impact on the code 
generation part.

: [Jim Roskind's yacc C++ parser is available in the compilers archives, but
: I'm not sure that'd much help for building an editor. -John]

The problem with Roskind's grammar is that in order to resolve the many
significant ambiguities in C++, Roskind "macro expanded" the productions
involved. While he resolved most of the conflicts, he created monster of
a grammar which bears little resemblance to the specification and is 
extremely difficult to use in practice. Based on our own experience and that
of our clients, we strongly recommend against the Roskind grammar for anything
more than simple syntactic checking.



KG Loh
Xorian Technologies Pte Ltd
389A Balestier Road
Singapore 1232
Republic of Singapore
Tel: (65) 255-7151
Fax: (65) 253-7709
email: xorian@solomon.technet.sg
Newsgroups: comp.lang.c++
Subject: Re: SUMMARY: Automatic differentiation
From: elston%boot.decnet@edwards-tems.af.mil (Mark Elston, NSI Inc., Edwards AFB CA)
Date: 29 Jul 92 07:27:10 -0700
Organization: T&E Mission Simulator - Edwards AFB, CA

In article <l75d3fINNmjl@almaak.usc.edu>, ajayshah@almaak.usc.edu (Ajay Shah) writes:
> robertd@kauri.vuw.ac.nz (Dr R Davies*xrbd*) writes:
> 
>>In article <l71d15INNakq@almaak.usc.edu> ajayshah@almaak.usc.edu (Ajay Shah)
>>   writes:
> 
>>To do symbolic manipulation in C++ you will probably want to use the kind of
>>representation I use in my matrix package, Newmat. Of course the basic
>>concept in that representation is taken from the reading I have done about
>>symbolic manipulation.
> 
> On to automatic differentiation.  No, automatic differentiation is NOT
> symbolic differentiation.  The key point in AD is we never evaluate
> the functional form of the derivatives.  We merely use the rules of
> calculus to numerically evaluate the derivatives at a given point.
>
> ...
> 
> The broad idea is like this.  Suppose we are evaluating a expression
> f(x,y,z) = x + (y*z).  If we overload '*' and '+' then it's possible
> to maintain the bookkeeping.
> 
> [the rest deleted]

There is an interesting book that you might want to get hold of.  It is called
"Numerical Derivatives and Nonlinear Analysis" by Harriet Kagiwada, Robert
Kalaba, Numa Rasakhoo and Karl Spingarn.  (Plenum Press, New York, 1986).

The first three chapters of the book deal with implementing this very type of
solution in FORTRAN and using it in optimal control/calculus of variations 
kinds of problems.  They call their implementation FEED (Fast and Efficient
Evaluation of Derivatives).

The approach that Ajay recommends should work and fits in well with FEED.

------------------------------------------
Mark Elston
elston@edwards-tems.af.mil

"Just trying to shed a little heat on the subject"

Newsgroups: comp.lang.c++,comp.std.c++
From: sdarbha@ho12.eng.ua.edu (Subrahmanyam Darbha)
Newsgroups: comp.lang.c++,comp.lang.c
Subject: Re: Population count.
Date: 23 Jul 92 19:25:53 GMT
Organization: The University of Alabama, Tuscaloosa

Newsgroups: comp.lang.c++,comp.lang.c
Subject: A Question on masking 
Summary: 
Expires: 
Followup-To: 
Distribution: 
Organization: The University of Alabama, Tuscaloosa
Keywords: 

           I need to convert a three dimensional identifier to a one,two or
three digit number.
I am doing it for converting a three dimensional pointer to a one dimensional   one .
I know for sure that it has got to do something with the masking.
Can somebody suugest me a way out of this
For Example what I have to do is find a unique number for each of three         dimensional Identifiers.
I need to find out a single unique number for each of all [1-999][1-999][0-3]
numbers.
Any help will be highly appreciated
Thanks a lot in advance

Subbu
  

-- 
It is from Darbha                                sdarbha@buster.eng.ua.edu
                                                   OFF : (205) 348 - 9289   
                                                   RES : (205) 750 - 0481
From: dve@mace.cc.purdue.edu
Newsgroups: comp.lang.c++
Subject: Re: Priblem with g++ & templates
Keywords: templates g++
Date: 30 Jul 92 13:34:50 GMT
Organization: Purdue University


	And I had a program using a lot of templates that 
	causes g++ (not my program) to dump core! 

	Zhou
Newsgroups: comp.lang.c++
From: maxtal@extro.ucc.su.OZ.AU (John MAX Skaller)
Subject: Re: boolean (was: Re: typedef vs enum)
Organization: MAXTAL P/L C/- University Computing Centre, Sydney
Date: Tue, 21 Jul 1992 17:09:22 GMT

	While we're talking of a boolean type (which has two
values equivalent to 0 and 1), how about a ZERO type?

	Type ZERO only has ONE value---0 of course.

	What use is it, you ask?

	Plenty. 0 is very important.

	How often have you wanted to allow assignment
or initialisation of a class to 0 (but not any other value?)

	For example, if p is a pointer, you can write

	p=0; // null pointer

But if it is a *smart* pointer, you would have to declare
assignment of say int->smart, and give a run-time error
if the int was non-zero.

[There are NO variables of type zero, the type name is, of course 0]

	class smart {
		operator=(0) { // set pointer to null state }
	};

Anyone?
	

-- 
;----------------------------------------------------------------------
        JOHN (MAX) SKALLER,         maxtal@extro.ucc.su.oz.au
	Maxtal Pty Ltd, 6 MacKay St ASHFIELD, NSW 2131, AUSTRALIA
;--------------- SCIENTIFIC AND ENGINEERING SOFTWARE ------------------
Newsgroups: comp.lang.c++
From: steve@taumet.com (Steve Clamage)
Subject: Re: ztc 3.0 bug Ternary operator & chars
Organization: TauMetric Corporation
Date: Tue, 21 Jul 1992 16:22:22 GMT

LANG@129.69.123.1 (MARTIN LANG) writes:

>This behavior is not a bug. The ternary operator evaluates arithmetic 
>expressions. Your character constants are handled as expressions and
>typecasted. That is the standard. (see ARM page 78)

It really is a bug.  The code in question looked like this:

	cout << (expr) ? '1' : '2';

The original printing of the ARM had the old C rule about promotion
of the 2nd and 3rd expressions; this was an error.  Check a later
printing, which you can identify by "Reprinted with corrections"
appearing near the bottom of the copyright page.

Page 78, second paragraph, should say

"... if they are of the same type the result is of that type; ..."

This means that "1" or "2" should be printed, not "49" or "50".
-- 

Steve Clamage, TauMetric Corp, steve@taumet.com
Vice Chair, ANSI C++ Committee, X3J16
Newsgroups: comp.lang.c++,comp.std.c++
From: pkt@lpi.liant.com (Scott Turner)
Subject: Re: Committee Members -> What do you think?
Organization: Liant Software Corporation
Date: Mon, 27 Jul 1992 16:09:47 GMT

In article <9220718.561@mulga.cs.mu.OZ.AU>, fjh@munta.cs.mu.OZ.AU (Fergus James HENDERSON) writes:
|> No, I think that he means the change which clarified the wording of the ARM to
|> explicitly allow cast-from-const. Apparently the previous wording was open to
|> interpretation, so compilers could have made optimizations assuming that
|> const really meant constant and still claim to be "ARM-compliant".
|> This change was apparently never voted on; apparently it was decided on by
|> the secretary (or president?) on the basis of discussion with Bjarne as to
|> the original intended meaning of the ambiguous wording.

Contrary to some inaccurate messages that have appeared in comp.lang.c++,
every revision the C++ committee has made to the ARM has been by
formal vote.  The change to allow cast-from-const appeared in the May 14, 1991
working paper, and was discussed and approved by formal vote on June 20, 1991
as recorded in the meeting's minutes. 
--
Prescott K. Turner, Jr.
Liant Software Corp. (developers of LPI languages)
959 Concord St., Framingham, MA 01701 USA    (508) 872-8700
UUCP: uunet!lpi!pkt                          Internet: pkt@lpi.liant.com
From: kers@hplb.hpl.hp.com (Chris Dollin)
Newsgroups: comp.lang.c++
Subject: Re: How to avoid calling destructor twice after fork()?
Date: 30 Jul 92 16:35:12 GMT
Organization: Hewlett-Packard Laboratories, Bristol, UK.

In article ... Bruce.Hoult@bbs.actrix.gen.nz writes:

   [quoting someone else]
   > I am using fork() system call in my C++ program. The problem is that each
   > calling of fork() creates a copy of calling process. The problem is any
   > instances created and not destroyed before fork() calling will be 
   > destroyed twice. [comiited]

   What's the problem?  After the fork you've got two seperate objects in
   different processes and running the destructor on both of them is the
   correct thing to do -- the only possible problem is that the fork()
   call effectively does a default operator= to create the second copy
   instead of using any operator= that you've defined.

That's all very well, but what if the objects are hanging on to an external
resource, such that the destructor does something *external*? For example, a
Window object might have an X window handle, and the destructor might destroy
the window. What happens if you try and destroy a destroyed window? Will the
code abort (so what happens to the other destructores - do they get run, too)?
Or will the server happily delete a new window that's been allocated the same
handle? The same with a lock file object - it might be a new lock (probably
shouldn't be, but it might). 

No, it's not that easy.






























































   -- 
   Bruce.Hoult@bbs.actrix.gen.nz   Twisted pair: +64 4 477 2116
   BIX: brucehoult                 Last Resort:  PO Box 4145 Wellington, NZ
   "Cray's producing a 200 MIPS personal computer with 64MB RAM and a 1 GB
   hard disk that fits in your pocket!"   "Great!  Is it PC compatable?"
--

Regards,    | It's strange how you suddenly discover bizarre and dangerous
Kers.       | holes in your knowledge.  I fell down one today. - Steve Knight
Newsgroups: comp.lang.c++
From: acoles@bwdls59.bnr.ca (Andrew Coles)
Subject: Commonview - anyone using it?
Reply-To: ACOLES@BNR.CA
Organization: BNR Woodline, Ottawa
Date: Tue, 28 Jul 1992 14:03:33 GMT

We're looking at a series of different class libraries, and I'm trying
to find out information about Commonview.  I know it's been around for
quite some time, and over the years it's had mixed reviews.  

Here's what I need to know:
        What's the quality of the classes?
        We need portability, what's the quality of the ports?
        Stability?
        Support? (their sales staff sure doesn't like to help you!)
        Comments?


Thanks in advance
AC
Newsgroups: comp.lang.c++
From: mork@yoyo.cc.monash.edu.au (Simon Raik)
Subject: C++ for 286's
Keywords: c++
Organization: Monash University, Melb., Australia.
Date: Wed, 22 Jul 1992 07:11:00 GMT

I have a 286 and want the best c++ compiler for it.
What do the people in the know recomend?

Cheers,
Simon Raik
simonr@bruce.cs.monash.edu.au
Newsgroups: comp.lang.c++