HDTenEightyP/NetNews huggingface dataset:
From: psrc@pegasus.att.com (Paul S R Chisholm)
Subject: Re: why `int X: :X()' ?
Reply-To: psrc@pegasus.att.com (Paul S R Chisholm)
Organization: AT&T Bell Laboratories
Distribution: na
Date: Wed, 6 Jan 1993 05:22:27 GMT
Summary: it's not int!

(By the way, "X: :X" isn't valid; "::" is a token, and can't be broken
up.  See the ANNOTATED REFERENCE MANUAL or "ARM", sections 2.1 and 2.4,
p. 5-7.)

In article <1992Dec30.172537.12477@csi.jpl.nasa.gov> mwette@csi.jpl.nasa.gov (Matt Wette) writes:
>Why are constructor and destructor functions usually declared to return
>ints when the usage typically warrents a `void' declaration.

Most functions return int if they don't declare what they return.  If
they don't return anything, they should declare a return type of void.

Constructors and destructors are special cases.  By definition, they
don't return anything; they don't have return types.  ARM, section
12.1, p. 265:  "No return type (not even void) can be specified for a
constructor.  A return statement in the body of a constructor may not
specify a return value."  Section 12.4, p. 276:  "A destructor takes no
arguments, and ont return type can be specified for it (not even
void)."

Paul S. R. Chisholm, AT&T Bell Laboratories/EasyLink Services,
att!pegasus!psrc, psrc@pegasus.att.com, AT&T Mail !psrchisholm
I'm not speaking for the company, I'm just speaking my mind.
Newsgroups: comp.lang.c++
From: bsjaffe@icd.ab.com (Bruce S. Jaffe)
Subject: Dynamic Dispatch Virtual Tables 
Organization: Allen-Bradley Company, Inc.
Date: Tue, 12 Jan 1993 15:59:18 GMT

A recent posting by Leo Lozner (leo@minsk.by) referenced the article
"The Dynamic Dispatch Virtual Tables", published in the May '92 issue
(vol 6 num 5) of ProgramNOW (Intra Press, London -- prognow@compulink
.co.uk).

I have not been able to locate a copy of this article, or to contact
either Leo or ProgramNOW.

Does anyone have a copy of this article which they could mail to me?

Alternatively, does anyone know how to reach ProgramNOW?

Please respond by email to bsjaffe@odin.icd.ab.com.

Thanks.
From: richard@lakes.trenton.sc.us (Richard Regan)
Newsgroups: comp.lang.c++
Subject: Re: Borland C++ & TVision
Date: Sun, 10 Jan 93 18:50:24 EST
Reply-To: richard@lakes.trenton.sc.us (Richard Regan)
Organization: Lakes Public Access

> Secondly, BC++'s TVision screen IO is absolutly slow compared to
> Pascal's TVision.  WHat can I do to speed C++'s tvision up?
> 
Change the global static variable "checkSnow" to false.  It is set to
true by default.  Changing to false should speed it up.

Richard
Newsgroups: comp.lang.c++
From: liu@vision(John Liu)
Subject: Passing 2-d arrys to functions
Organization: Queen's University, Kingston
Date: Thu, 7 Jan 1993 17:48:23 GMT


-- 
I am trying to learn C++ and have a problem in passing a 2-d matrix to and 
   from a function. Specifically, the problem is as follows:

   main()
   {
   double a[2][2];
   ......
   func(a);
   }

   void func(double b[][]){
   ......
   }

   When I tried to compile it, I got error message that the dimension of the matrix 
   b is null. However, I did not have any problem in passing any 1-d array
   using the same way. I am working on SUN stations in our department.

   Would anyone help me solve this problem?

=============================================================================
John Liu 
Department of Electrical Engineering
Queen's University                       Phone:  (613)545-6693
Kingston, Ontario, Canada K7L 3N6        Email:  liu@sound.ee.queensu.ca
From: ajp@dsl.eng.cam.ac.uk (A. J. Piper)
Newsgroups: comp.lang.c++
Subject: Restatement: Virtual base class & reference initialisation
Date: 11 Jan 93 14:34:31 GMT
Organization: Engineering Department, Cambridge University, England.


 
My original question on this did not include an example which is probably why I
was misunderstood. The scenario is this:
 
class A {
        const int& a;
        A(const int& i) : a(i) {}
        A() : a(0) {}
};
 
class B : virtual public A {
        B(const int &i) : A(i) {}
};
 
class C : public B {
        C(const int& i) : B(i) {}
};
 
The reason I asked is that if you create an object of type C then B's
initialisation of A is ignored and the default constructor is used instead
(try it - it's true) this is because B in C is not the most-derived class for
the object (ARM p293-294). So how do I initialise the reference ? Well cfront
3.0.1 allows me to access the constructor of A directly from the constructor
of C so I can write:
 
class C : public B {
        C(const int& i) : B(i), A(i) {}
};
 
Which solves my original question. However, this "feature" is none to clear in
the ARM (is it legal?) and I'm a bit concerned about the behaviour of my
program altering `behind my back' as it were as soon as I start deriving
things. The example the ARM gives involves deriving C from A again which
means the constructor is not ignored as C *is* the most-derived class for
the object.
 
Is there any other way ? I would have thought a better solution would be to
allow the original code to work - as long as the compiler can detect that
constructors in a multi-path initialisation are all doing the same thing and
thus ignore all but one of them.
 
andy

--
Andy Piper					email: ajp@uk.ac.cam.eng
Cambridge University Engineering Department 	tel: +44 223 33 2754
Trumpington St
Cambridge, UK
--
Andy Piper					email: ajp@uk.ac.cam.eng
Cambridge University Engineering Department 	tel: +44 223 33 2754
Trumpington St
Cambridge, UK
From: hartman@ulogic.UUCP (Richard M. Hartman)
Newsgroups: comp.lang.c++
Subject: Re: Help! Problem with Protogen (BC++ 3.1)
Date: 4 Jan 93 20:08:07 GMT
Followup-To: hartman@ulogic.COM
Organization: negligable

Protogen may create the .PRJ file, but the library settings and such
are saved in the desktop file, projectname.DSK.  You have to set up
the paths to any libraries you are using yourself.  Both under the
Options/Directories and Options/Linker/Libraries.  If you have any
more questions, e-mail me.  I post this instead of e-mail in case
other folks are having the same problems.

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
It's not the way that you say it	|
when you do those things to me,		|	-Richard Hartman	
it's more the way you really mean it	|	hartman@uLogic.COM
when you tell me what will be.		|
From: coxm@Software.Mitel.COM (Michael Cox)
Newsgroups: comp.lang.c++
Subject: Re: C++ coding style guide??
Date: 7 Jan 93 19:23:40 GMT
Distribution: usa
Organization: Mitel. Kanata (Ontario). Canada.

In article <1993Jan6.140237.4060@news.weeg.uiowa.edu> pkoch@news.weeg.uiowa.edu (Peter F Koch) writes:
>
>Anyone know of a good C++ coding style guide?
A good one is by Swedish Telecom.  It not only has good rules but the ones that
I don't agree with I do agree with the explanation they give.  The copy I have
is in PostScript form (sorry no original).  Interested?

Michael
-- 
Michael H. Cox      | The end of the Earth is expected in 2.3 billion years.
                    | Have you made the correct investment decisions?
Mitel Corporation   | 
Newsgroups: comp.lang.c++
From: njw@bohra.cpg.oz.au (Neil Webb)
Subject: Angela Heal [looking for]
Organization: Computer Power Software Group Pty Ltd
Date: Wed, 13 Jan 1993 01:27:36 GMT


[posted on behalf of John Fisher]

Ms Angela Robyne Heal
formerly of
 
1/14 Porter Road
Heidelberg Heights Vic 3081
Australia
 
If you are reading this could you please contact your mother as she is
concerned for your safety.
 
 

Newsgroups: comp.lang.c++
From: feustel@netcom.com (David Feustel)
Subject: Re: oopslooking for PerClass/SizeFreeList, oops
Organization: DAFCO: OS/2 Software Support & Consulting
Date: Sun, 10 Jan 1993 13:51:46 GMT

Does the dosx mode of the Zortech compiler support paging of virtual
memory (i.e. permit a 4 meg program to run with only 1 meg of physical
memory)?
-- 
Dave Feustel N9MYI <feustel@netcom.com>
 
                        Happy Holidays to ALL!!!
From: arveh@nft.no (Arve Hoiberg)
Newsgroups: comp.lang.c++
Subject: NIH Class Lib. on SGI-machine
Date: 6 Jan 93 09:33:16 GMT
Organization: Norsk Forsvarsteknologi A/S, P.B. 1003, N-3601 Kongsberg, Norway.

Have anybody successfully tested the NIH Class library on Silicon Graphics
machines? If so, I would be glad to hear about it.
I'd also like to know if there exist a class library (which can be used on
SGI-machines) for list hadling (or 'Ordered Collection' handling as in NIH).
 

Thanks in advance.

----------------------------------------------------------------------
Arve Hoiberg,                               phone:   +47 3 739807
Norsk Forsvarsteknologi A/S,                e-mail:  arveh@nft.no
P.B. 1003,
N-3601 Kongsberg,
Norway
----------------------------------------------------------------------
From: bell-lee@hpfcse.HP.COM (David Bell-Lee)
Date: Mon, 11 Jan 1993 23:58:37 GMT
Subject: C++ HyperText Classes
Organization: Hewlett Packard Co.
Newsgroups: comp.lang.c++

C++ HyperText Classes

Does anyone out there have knowledge of the existence of some C++
classes to implement some HyperText type stuff?

Thanks,

David Bell-Lee
Hewlett-Packard Customer Educational Services
San Francisco Education Center
E-mail: dibl@hpsfecid.mayfield.hp.com
Tel: (415) 691-3782
Newsgroups: comp.lang.c++
From: tmb@arolla.idiap.ch (Thomas M. Breuel)
Newsgroups: comp.lang.c++
Subject: Re: feedback wanted on appropriate OOPL
Date: 11 Jan 93 01:04:08 GMT
Article-I.D.: arolla.TMB.93Jan10170408
	<1992Dec29.011354.5929@informix.com>
	<726278910snx@trmphrst.demon.co.uk> <rmartin.726674455@thor>
Reply-To: tmb@idiap.ch
Organization: IDIAP (Institut Dalle Molle d'Intelligence Artificielle
	Perceptive)
NNTP-Posting-Host: arolla.idiap.ch
In-reply-to: rmartin@thor.Rational.COM's message of Sun, 10 Jan 1993 14:00:55 GMT

In article <rmartin.726674455@thor> rmartin@thor.Rational.COM (Bob Martin) writes:

   A language can have a significant impact, however, on quality,
   run-time efficiency and coding efficiency.  C++ will certainly catch
   more programmer errors than stalk [Smalltalk], [...]

It is only true to say that _at compile time_, C++ will catch more
programmer errors than Smalltalk.

If you take into account both compile time and runtime, Smalltalk will
catch more "programmer errors" than C++: not only will Smalltalk catch
all type errors, but also bad pointers, overflows, and array bounds
violations, errors that go undetected in most C++ implementations and
are not mandated to be detected by the C++ definition.

					Thomas.
Newsgroups: comp.lang.c++
From: rmartin@thor.Rational.COM (Bob Martin)
Subject: Re: feedback wanted on appropriate OOPL
Organization: Rational
Date: Mon, 11 Jan 1993 23:38:54 GMT

tmb@arolla.idiap.ch (Thomas M. Breuel) writes:

|Detecting errors at compile time is better than detecting them
|at runtime. But detecting errors at runtime is better than not
|detecting them at all.

|Unfortunately, the majority of errors that are detectable at all can
|only be detected at runtime.

I disagree with this statement.  In my experience, the majority of
detectable errors, are detected in the compilation phase (and in the
code review phase of course).

| C++ has no support for runtime error
|checking, 

Although there are common environments that provide it.

|and C++ programmers leave out most of those checks (many
|couldn't be coded efficiently in user code anyway). That makes
|C++ programs relatively untrustworthy, but gives everybody the
|illusion that C++ is a "fast" language.

I don't think the speed is an illusion.  Nor do I agree that C++
programs are necessarily less trustworthy than stalk programs.

|I believe that safety will become of paramount importance in software
|over the next decade. 

I am in wholehearted, enthusiastic agreement. 

|C++ will either adapt by mandating more runtime
|checks (integer overflow, pointer checks, garbage collection),

Probably through the agency of class libraries which provide these
runtime checks transparently.

Certainly vector bounds checking and arithmetic exception testing can
all be encapsulated within classes.  

|or
|other languages will take over its niche. 

This is inevitable, but probably not soon.

|But even if C++ adapts, it
|is still at a disadvantage, since it seems that many runtime safety
|features are more expensive to provide in C++ in a way that is
|compatible with C++ than in other languages that aren't hampered
|by backwards compatibility.

This I doubt.  I think it is more that some runtime features are
expensive, period.  Languages that support them, have made a different
tradeoff than that made in C++, and have sacrificed something else
(probably speed) thereby.


--
Robert Martin                        Training courses offered in:
R. C. M. Consulting                       Object Oriented Analysis
2080 Cranbrook Rd.                        Object Oriented Design
Green Oaks, Il 60048 (708) 918-1004       C++
From: rrp@cfm.brown.edu (Bob Petrocelli)
Newsgroups: comp.lang.c++
Subject: Help building libg++...(please)
Date: 4 Jan 1993 19:26:22 GMT
Organization: Brown University Center for Fluid Mechanics
Distribution: usa
NNTP-Posting-Host: dam.brown.edu
Originator: rrp@rufus

Hello g++ users:

I have recently ftp'd libg++-2.3 and have had problems building
it..I have a sun4 running sunos 4.1.2 and am using gcc-2.3.2.
I configured the make files with the command:' configure sun4
--prefix=/usr2/local' and performed a 'make all' ...the
make failed with the message:

dummy.c 4: Can't find include file stdarg.h


yet stdarg.h lives in the g++-include directory?

I must be missing some obvious point and any suggestions would be helpfull.

Thanks,

Bob Petrocelli

rrp@dam.brown.edu


Newsgroups: comp.lang.c++
From: joe@proto.com (Joe Huffman)
Subject: Re: 32bit Zortech Pointers
Organization: FlashTek, Inc.
Date: Wed, 06 Jan 1993 21:51:13 GMT

empath@ais.org (Tim Triemstra) writes:

>The code goes something like this:

>unsigned char *buffer;
>//malloc the buffer I believe
>InitVoice(buffer);

>My pointer logic is real bad at 4am but that is the gist of it.  In the
>32bit mode, I get static - but the proper amount of static which mean that
>the interrupt is being called and killed correctly, but not given the proper
>data - hence the concept of improper pointer holding in 32bit modes with
>interrupts.  

What I suspect the problem is that your InitVoice() routine does is execute
something in real mode.  The protected mode pointer that you pass to it is
not valid while in real mode.  What you will need to do is allocate some
real mode memory (int 21H function 48H) then use the protected mode pointer
to put the data into the buffer from protected mode, then use the real mode
pointer to pass to the real mode code to take the data out of the buffer.

>Thanks again guys.  Joe - I sent this code a while back UUENCODED to
>you att proto com, so if this interests you and you would "like" to get
>it working go fer it.  It's just gonna be GNU distrubuted when done anyhow.

I have the code, but I don't have a sound blaster to try it out on... thanks.

-- 
netcom!proto!joe
joe@proto.com
Newsgroups: comp.lang.c++
From: mjkim@kaist.ac.kr (Kim Myoung-Jun)
Subject: Re: BC++ 3.1, outportb -> Bad call
Organization: Korea Advanced Institute of Science and Technology
X-Newsreader: TIN [version 1.1 PL8]
Date: Sun, 10 Jan 93 09:45:45 GMT

Turn off pre-compiled headers. I have simillar experience.
Using BC++ 3.0 with pre-compiled headers on, it often produced
incorrect EXE file with successful compilatoin message.
I could fix this by Full Build.. (or deleting .SYM maybe works).
Now I doesn't use pre-compiler headers. Yes, compling is slow.
But it's not much time and I am happy with correct EXE file.

Myoung-jun Kim
mjkim@jupiter.kaist.ac.kr
Newsgroups: comp.lang.c++
From: heliotis.ROCH803@xerox.com (Jim Heliotis)
Subject: Re: "type safety" deemed essential
Reply-To: heliotis.ROCH803@xerox.com
Organization: Xerox Corporation, Webster NY
Date: Fri, 8 Jan 1993 20:42:28 GMT

In article 93Jan6220042@arolla.idiap.ch, tmb@arolla.idiap.ch (Thomas M. Breuel) writes:

>Unfortunately, C++ still lacks some kind of "tagged union type",
>"typesafe union type", or, if you are a Pascal fan, a "variant record
>with runtime type checking". Those kinds of datatypes are useful in
>many applications. A common example is that of a binary tree with
>different node and leaf types.
>
>:
>:

That's exactly what subclasses (er, excuse me, derived classes) replace.
I really think the need for variant records should be VERY rare now in
C++, especially if they add RTTI, but it's even largely true without it.

============================================================================
Jim Heliotis                                       Voice Phone: 716-383-7410
Xerox Corporation                                   FAX Phone:  716-383-7395
435 W. Commercial St.                                     Mail Stop: 803-01A
East Rochester, NY 14445              Electronic Mail: JEH.ROCH803@Xerox.COM
============================================================================


Newsgroups: comp.lang.c++
From: ae2@cunixa.cc.columbia.edu (Amiran Eliashvili)
Subject: using new
Reply-To: ae2@cunixa.cc.columbia.edu (Amiran Eliashvili)
Organization: Columbia University
Date: Fri, 8 Jan 1993 17:19:50 GMT


Hi folks:

	I am in the process of porting a C program into C++ and
learning a lot about C++. I am trying to find an equivalent C++
construct for the following malloc command:

		
	ptr = (TypeCast *) malloc( LENGTH(n));

where Length(n) is a macro that will return the n times of the
desired object size. I have tried the following statement using new
but for no avail:


	ptr = (TypeCast *) new char(LENGTH(n));


The statement with new operator does not deliver exactly what the
malloc does. Any suggestions how to use new to get the same 'effect' as what the malloc does in statement a. Thanks much.


Please reply to :

ae2@cunixa.cc.columbia.edu

/amiran
Newsgroups: comp.lang.c++
From: nikki@trmphrst.demon.co.uk (Nikki Locke)
Subject: Re: C++ Source code / files, etc..
Reply-To: nikki@trmphrst.demon.co.uk
Distribution: world
X-Mailer: cppnews $Revision: 1.30 $
Organization: Trumphurst Ltd.
Date: Tue, 5 Jan 1993 18:07:41 +0000

In article <19039@mindlink.bc.ca> Ian_Upright@mindlink.bc.ca (Ian Upright) writes:
> Can anybody provide me of the location and ftp sites of the FAQ for this
> group ...

Many thanks to Marshall Cline for compiling and maintaining it. 

It can be obtained ...

Via ftp - Anonymous ftp from sun.soe.clarkson.edu [128.153.12.3] :pub/C++/FAQ

Via mail - send mail 
To: archive-server@sun.soe.clarkson.edu
Subject: send C++/FAQ

-- 
Nikki Locke,Trumphurst Ltd.(PC and Unix consultancy) nikki@trmphrst.demon.co.uk
trmphrst.demon.co.uk is NOT affiliated with ANY other sites at demon.co.uk.
Xref: sparky comp.lang.c++:18803 comp.object:4730
From: sailer@hpuerca.atl.hp.com (Lee Sailer)
Newsgroups: comp.lang.c++,comp.object
Subject: Re: Pros and cons of C++
Date: 7 Jan 93 17:48:44 GMT
Organization: Hewlett-Packard NARC Atlanta
X-Newsreader: Tin 1.1.3 PL5

John Ross (yjohn@gpu.utcs.utoronto.ca) wrote:
: Hi Netters,
: 
: I just read a paper by Markku Sakkinen titled "The Darker Side of C++
: Revisited," (Structured Programming [1992] 13: 155-177).
: 
  .. comments deleted ...
: 
: Why then is it becoming so popular?  Why the deluge of texts, articles,
: magazines, news groups, compilers, etc?  It seems to me that C++ _will_

Good question.  I suppose that the usual superficial arguments apply:

1.  It is a language that C programmers can learn incrementally.

2.  It is from a big name source, Bell Labs.

3.  It's creators are very, very industrious.

4.  Alternatives, such as Objective-C and Eiffel, weren't from big names
    and their creators weren't as industrious.  (Apologies to Cox and
    Meyer, who are both working very hard.)

I prefer Objective-C, though Eiffel is very nice.  I sometimes teach
and consult C++ for a living, because that's where the marketplace is.

I predict a minor resurgence of Objective-C.  Consider the following:

1.  NeXT is still surviving, and it uses Obj-C heavily.

2.  FSF has added Obj-C to its C/C++/OBJ-C compiler.

3.  There is an Obj-C front end for Borland C.

In 1 and 2, it is more correct to call the language Obj-C++, since
both syntaxes can be used in a single program, without great difficulty.



-- 
Lee Sailer

					- Let's leave my employer
					  out of this, OK?
Newsgroups: comp.lang.c++
From: mbersohn@alchemy.chem.utoronto.ca (M. Bersohn)
Subject: A Fine Beginner's Book on C++
Originator: mbersohn@plumbum.chem.utoronto.ca
Organization: University of Toronto Chemistry Department
Date: Sun, 10 Jan 1993 09:54:48 GMT

As the best beginner's book on C++ for somebody who knows C I
recommend TEACH YOURSELF C++ by Herbert Schildt, published by Osborne
McGraw Hill  ISBN 0-07-881760-9 
It is only a primer. There is no depth and it lacks detail; for
example templates are not mentioned. BUT, there is a superb
wealth of practice examples with answers and frequent quizzes
with answers. The progression is quite gradual. This book is
a highly efficient way to get started with C++, provided you
know C. Incidentally this book is not mentioned in the FAQ.
From: mikef@dcs.ed.ac.uk (Mike Fourman)
Newsgroups: comp.lang.functional
Subject: Re: Looking for PolyML Supplier
Date: 11 Jan 93 12:56:36 GMT
Distribution: uk
Organization: Department of Computer Science, University of Edinburgh

In article <1993Jan7.155550.16069@srd.bt.co.uk>, psanders@srd.bt.co.uk (Paul Sanders) writes:
> Does anyone have a contact e-mail address for the current suppliers of 
> PolyML ?

ahl@ahl.co.uk

-- 
Prof. Michael P. Fourman                     email        mikef@dcs.ed.ac.uk
Dept. of Computer Science                    'PHONE (+44) (0)31-650 5198 (sec)
JCMB, King's Buildings, Mayfield Road,              (+44) (0)31-650 5197
Edinburgh EH9 3JZ, Scotland, UK                 FAX (+44) (0)31 667 7209
-------------------------------------------------------------------------------
From: ark@alice.att.com (Andrew Koenig)
Newsgroups: comp.lang.functional
Subject: Re: Length of Arrays in SML
Date: 6 Jan 93 09:28:50 GMT
Article-I.D.: alice.24561
Reply-To: ark@alice.UUCP ()
Organization: AT&T Bell Laboratories, Murray Hill NJ

In article <C0ECE1.Ju@cs.dal.ca> ssmith@ug.cs.dal.ca (Susan E Smith) writes:

> PROBLEM:  I am using Standard ML (New Jersey), Version 0.66 and I am trying
> to use the Array function "length" to get the length of an array.

The problem is that the built-in function "length" takes a list,
as you found out.  What you want is the "length" in the Array
structure, which is therefore called Array.length:

	val My_Array = arrayoflist ["Hi","My","Name","Is","Bob"];
	Array.length My_Array;

should print 5.
-- 
				--Andrew Koenig
				  ark@europa.att.com
Newsgroups: comp.lang.functional
From: ramaer@cs.utwente.nl (Mark Ramaer)
Subject: LML, Gofer and glhc for linux?
Organization: University of Twente, Dept. of Computer Science
Date: Fri, 8 Jan 1993 13:53:44 GMT

Some time ago somebody at the University of Glasgow posted an article
that he ported LML, glhc and Gofer to linux.  I tried download these
packages from ftp.dcs.glasgow.ac.uk but I get the response:

  Connected to vanuata.dcs.glasgow.ac.uk.
  421 Service not available, remote server has closed connection

How can I get LML, glhc and Gofer for linux, I do not want to
do the porting all over again.

Thanks in advance,
Mark Ramaer