HDTenEightyP/NetNews huggingface dataset:
From: cwu@metra2.portal.com (Chsz-Hyen Wu)
Subject: scrrooling Widget with different color items
Organization: Metra Instruments Inc
Date: Wed, 27 Jan 93 17:24:48 GMT

I am using OLIT to create scrollingList Widget and to display alarm
message.
 
Based on different types of alarms, I'd like to set different colors
on different alarm item.
 
How can I do this? I don't see any resources I can use.
Did I miss something ? or this has to be done on the lower X-lib
level ?

Newsgroups: comp.lang.c++,comp.object
From: hmchang@eecs.nwu.edu (Hao-Ming Chang)
Subject: Compiling xxgdb in g++ ?
Organization: EECS Department, Northwestern University, Evanston, Il., USA
Date: Mon, 25 Jan 1993 19:29:22 GMT

I would like to compile the xxgdb source codes by g++. Do I have to modify
the source codes a lot ? What should I do ?
Any help will be appreciated.
From: KOCHER@nvdv.e-technik.uni-stuttgart.dbp.de (HARTMUT KOCHER)
Newsgroups: comp.lang.c++
Subject: Re: Was: Template Use <sigh>
Date: 25 Jan 1993 10:12:34 GMT
Organization: University of Stuttgart, IND (Germany)
Distribution: world
NNTP-Posting-Host: nvdv01.ind.e-technik.uni-stuttgart.de
X-News-Reader: VMS NEWS 1.24

In <1jpafuINNjrm@rs6000.bham.ac.uk> pickerig@eee.bham.ac.uk writes:

> Further info to my post:
> 
>   1/ I am using AT&T C++ V3.0.1
>   2/ The problem lies in using archived libraries it seems.
> 
> Guy.
> 
> --
> +--------------------------------+-----------------------------------------+
> | Guy Pickering                  | School of Electronic & Electrical Eng,  |
> | E-MAIL: G.PICKERING@uk.ac.bham | University of Birmingham,               |
> | Tel: (021) 414 4340            | Edgbaston, Birmingham. B15 2TT.         |
> +--------------------------------+-----------------------------------------+
> 
> 
Hi Guy,
if all your files are in different directories, the compiler/linker might
not find the right repository to use. When you compile the file that uses
your template class, the compiler will write some additional information
in the repository, e.g., the name of the file which defines your template, etc.
This information is needed during link time to instantiate the templates.
If your files are in different directories, your compiler might not be able
to locate the right repository. I use the -ptr switch to list all repositories
of all directories that I use (Cfront 3.01 on HP WS).

Hope this helps
Hartmut

Newsgroups: comp.lang.c++
From: xinxu@stam.qe.bell.ca (Xin Xu)
Subject: Re: Reference vs. Pointer
Organization: Telecom Canada E.D.S.
Date: Wed, 20 Jan 1993 19:37:05 GMT

In article <dak.727298364@messua>, dak@messua.informatik.rwth-aachen.de (David Kastrup) writes:
|> xinxu@stam.qe.bell.ca (Xin Xu) writes:
|> 
|> 
|> >What does "reference variable" can do but "pointer variable" can't ?
|> 
|> You need not remember for every function argument, whether you got a
|> pointer or not, when you do not change the argument.
|> 

Sorry, I can not understand  your point here.

|> Functions can easily return lvalues. That is especially important
|> for efficient implementation of classes like Complex, which would
|> otherwise mangle up their syntax horribly.
|> 

OK

|> The scope of the referenced variables can be cleanly determined by
|> the compiler.
|> 

what "cleanly" means here compared to "pointer" ?

|> You can pass structures by reference, just like arrays are always passed,
|> thus making certain function calls much faster.
|> 

I can pass structures by pointer too, and I can not see the speed problem 
for using pointer.

|> Of course you can work around everything.
|> Remember that c++ can do nothing that c already can (therefore, you can
|> mechanically translate into c as with cfront), but the syntax
|> and concepts are much more pretty and comprehensible.
From: satish@sun.mcs.clarkson.edu (Satish Thatte)
Newsgroups: comp.lang.c++
Subject: "like current" for C++
Date: 27 Jan 93 19:27:44 GMT
Reply-To: satish@sun.mcs.clarkson.edu
Organization: Clarkson University

Has there been any discussion in the C++ community about adopting
Eiffel's "like current" typing idea?  This is a great
way of avoiding much awkwardness (and explicit casting)
resulting from the (quite necessary) rule that replacement
definitions for virtual functions must have EXACTLY the
same signature as the original declaration.

IMHO this is one of the issues worthy of discussion
as part of the standardization effort for C++.

Satish

P.S.  I can supply examples if anyone finds them necessary.

P.P.S.  Forgive my ignorance if this has already been discussed;
        and please reply directly to me -- I am not a regular reader of newsgroups.
Newsgroups: comp.lang.c++
From: maxtal@extro.ucc.su.OZ.AU (John MAX Skaller)
Subject: Re: Why is C++ not considered a true OOL?
Organization: MAXTAL P/L C/- University Computing Centre, Sydney
Date: Fri, 22 Jan 1993 19:47:24 GMT

In article <1993Jan21.034840.11361@syacus.acus.oz.au> ian@syacus.acus.oz.au (Ian Joyner) writes:

>A good language will 'help' you write good programs, especially where a
>team of a number of people are concerned. OOP helps organise a project
>somewhat, and C++'s OO features are a help in this way. However, since
>it is based on C it is less of a help than could be desired from a
>purer OOL.
>
>Some people see pure OOLs as restrictive. 

	Especially if they favour writing some programs
using an ADT approach rather than an OO one.

	C++ lack of restrictions may be seen as an advantage then.
It saves swapping languages for different types of project.
This enables reuse of existing codes.

>But it is rather like having
>a traffic system that has a rule that you drive down one side of a road.
>It might seem restrictive if you are on an empty road, but in a busy
>street, it makes it possible to get to where you are going. I am not
>really convinced of the power of C++ over other languages, but with
>it you can certainly drive in all sorts of directions, and this does
>not necessarily help in the economic production of quality software.

	It is certainly true that if you mix your idioms
in C++ you get a mess. However, writing consistent
programs using one of the many styles supported by C++
is possible, it just takes extra learning.

	perhaps, C++ lets you catch an ADT train or 
even walk the C street, rather than trying to drive
through an OO traffic jam :-)

	Besides, there are different "OO" styles,
and the difference between say Object heirarchy
based programming with dynamic downcasts, and
mixin style using abstract virtual bases and
multiple inheritance are probably so great
that it is hard to think of both as the same OO.
C++ allows both.  A "pure" OOPL probably could not.




-- 
;----------------------------------------------------------------------
        JOHN (MAX) SKALLER,         maxtal@extro.ucc.su.oz.au
	Maxtal Pty Ltd, 6 MacKay St ASHFIELD, NSW 2131, AUSTRALIA
;------ SCIENTIFIC AND ENGINEERING SOFTWARE ---ph:  2 799 8223 --------
From: murison@cfa.harvard.edu (Marc A. Murison)
Newsgroups: comp.lang.c++
Subject: Re: buffering iostreams
Summary: casting destroys buffering -- but not in BC++ 3.1
Date: 28 Jan 93 13:19:19 GMT
Organization: Smithsonian Astrophysical Observatory

/*In article <1k2co6INN7mm@wilma.cs.widener.edu> quairoli@cs.widener.edu (
Patrick J. Quairoli) writes:
>[...]
>i've tried:
>cout << setw(sizeof(long)) << (char)foo;
>which gives me 'H' but it is not buffered (i.e. its' flush with the
>left of the screen and there are no trialing spaces). if it were
>buffered as a long it would be 'H   '.
>[...]
>? how do i get a long to be cast as a char and still buffer it?
>(i'm using BC++ 3.0)

Using BC++ 3.1, the following produces 'H   ...':
*/

#include <iomanip.h>
void main( void )
{
    long foo = 72;
    cout << setiosflags( ios::left ) 
         << setw(sizeof(long)) 
         << (char)foo << "...";
}

/*
Leave out the left justification, and it produces '   H...'.
Perhaps there was a change from BC++ 3.0 to 3.1?
*/
---------------------------------------------------------------------
| Marc A. Murison          |  Smithsonian Astrophysical Observatory |
| murison@cfa.harvard.edu  |  60 Garden Street,  MS 63              |
| (617) 495-7079           |  Cambridge, MA 02138                   |
---------------------------------------------------------------------
Newsgroups: comp.lang.c++,comp.sys.sgi
From: vulture@imperial.ac.uk (Thomas Sippel - Dau)
Subject: Delayed Instantiation with Templates - How ?
Followup-To: poster
Reply-To: cmaae47@imperial.ac.uk
Organization: Imperial College of Science, Technology and Medicine
Date: Fri, 22 Jan 93 16:46:10 GMT

Hello all,

having gotten our shiny new C++ compiler with all those important facilities 
we thought our problems would be over. In fact, they haven't started yet.

We try to use templates and hit the old linked list problem: you can't use
a type before its declared, so you can't have in an object type definition
a pointer to such.

The program below does not do much, but shows our problem. We got the 
following error messages:

zorn$ CC shape.C
"shape.C", line 21: error: new shape; shape is undefined
"shape.C", line 21:      error detected during the instantiation of List <shape>
"shape.C", line 32:     is the site of the instantiation
"shape.C", line 5: error:  shape undefined, size not known
"shape.C", line 5:       error detected during the instantiation of List <shape>
"shape.C", line 32:     is the site of the instantiation
"shape.C", line 5: warning: delete shape ( shape not defined)
  
zorn$ versions c++
I  c++                  12/17/92  C++, 3.0
I  c++.hdr              12/17/92  C++ Headers
I  c++.hdr.lib          12/17/92  C++ Library Headers
I  c++.opt              12/17/92  C++ Optional
I  c++.opt.gifts        12/17/92  C++ Gifts
I  c++.sw               12/17/92  C++ Software
I  c++.sw.c++           12/17/92  C++ Compiler (version 3.0)
I  c++.sw.lib           12/17/92  C++ Libraries

zorn$ uname -a
IRIX zorn 4.0.5F 08280217 IP20 (N.B. IP7 and IP12 - same difference)

We did RTFM and saw that what we really want is to delay instantiation of
the class shape, but we could not quite get the idea how. Any help will be 
greatly appreciated.

Thanks in advance.                    Thomas

zorn$ cat shape.C
// The general-purpose generic List type

template<class T>
class List
{

private:

    // Vector of values
    T* v;
    
    // Number of elements in above vector
    int sz;

public:

    // Construct with length specified
    List(const int sl)
    {
        register int s = sl;
        if (s>0) v = new T[long(sz=s)];
        else { v = 0; sz = 0; }
    }

    // Destroy list elements
    ~List() { delete[] v; }

};

class shape;

typedef List<shape> shapeList;


class shape
{
        void subShapes(shapeList&){};
};

main()
{
    List<shape> s(2);
}

Keywords: 


-- 
*** This is the operative statement, all previous statements are inoperative.
*   email: cmaae47 @ ic.ac.uk (Thomas Sippel - Dau) (uk.ac.ic on Janet)
*   voice: +44 71 589 5111 x4937 or 4934 (day), or +44 71 823 9497 (fax)
*   snail: Imperial College of Science, Technology and Medicine
*   The Center for Computing Services, Kensington SW7 2BX, Great Britain
Newsgroups: comp.lang.c++
From: steve@taumet.com (Steve Clamage)
Subject: Re: Optimized C++ library
Organization: TauMetric Corporation
Date: Fri, 22 Jan 1993 19:56:08 GMT

pauln@loopkill.EBay.Sun.COM (Paul Nguyen) writes:


>We have an application that runs OK when all the libraries were compiled with the
>-g option.  But when the libraries were re-compiled with -O for optimization.  The
>application seems to crash randomly in one of the library.  The library that it
>crashes in was entirely written in C++ with inheritance, etc...

>Is it possible that compiling with -O uncovered a bug?


Of course.  It is also possible for compiling with -O to hide a bug.

For example, suppose you have a wild pointer in your program
(uninitialized or dangling).  When you use the pointer, some arbitrary
piece of memory will be accessed (or access attempted).  Since the
stack and code layout is usually different with and without debugging,
you might get a harmless reference in one case, and a fatal mistake
in the other case.

Alternatively, the compiler might have an error in its optimizer.  I
would not suspect this (unless the optimizer is known to have problems)
until you know that you don't have bugs in your code.

Quick experiment: compile without debug and without optimization.
If the code still fails, it is probably your code, not the compiler.
-- 

Steve Clamage, TauMetric Corp, steve@taumet.com
Newsgroups: comp.lang.c++
From: warsaw@nlm.nih.gov (Barry A. Warsaw)
Subject: Re: C++ maintenance
Reply-To: warsaw@nlm.nih.gov (Barry A. Warsaw)
Organization: Century Computing, Inc.
Distribution: na
Date: 24 Jan 93 23:11:36 GMT


>>>>> "Darren" == Darren Burns <djb@geovision.gvc.com> writes:

    Darren> But foo could be a global variable, a member of the_class,
    Darren> or a variable local to the function.  I have to hunt all
    Darren> over the place just to find out where to look for xxx.

We address this problem with a simple coding standard. We use the
following naming convensions:

	global variable:  Gfoo
	file local:       Lfoo
	class member:     xfoo
	auto var/fn arg:  foo
From: eggert@rbg.informatik.th-darmstadt.de (lars eggert)
Newsgroups: comp.lang.c++
Subject: Re: Tool box for c++
Date: 27 Jan 1993 09:46:45 GMT
Organization: TU Darmstadt
Distribution: world
NNTP-Posting-Host: rbhp44.rbg.informatik.th-darmstadt.de

In article <1k53vfINNjak@menudo.uh.edu>, aruna@tree.egr.uh.edu (Affable) writes:
>  Is there any commercial/free software package available for the objects 
>  such as sliders,scrollers, buttons etc? if so, where? And what is the cost
>  if it is not free? I'm interested in using them in Sun workstations and 
>  IBM-PCs. Every response with any pointer to the info. will be highly
>  appreciated and acknowledged.

There is a library called ET++. It has just what want plus many
more features.

It's quite new, quite good, but still buggy. We used it to implement
an user interface for an EIFFEL-interpreter. 

It runs on SUNs and other Unix machines, but I don't think it has been 
ported to IBM-PCs.

Here's the address of one of the authors. You should contact him if
you need more information about ET++.

        Andre Weinand
        Union Bank of Switzerland
        UBILAB (Union Bank Informatics Laboratory)
        Bahnhofstrasse 45
        P.O.Box
        CH-8021 Zurich
        Switzerland

        phone: +41-1-236-40-53
        fax:   +41-1-236-46-71
        e-mail: weinand@ifi.unizh.ch

Lars Eggert (eggert@rbg.informatik.th-darmstadt.de)
Some things are so snazzy they never go out of style!
Like tail fins... And bubble domes... And shag carpeting...
-- Homer, designing a car, "Oh Brother, Where Art Thou?"
From: lopes@cogsci.ucsd.EDU (alann lopes)
Newsgroups: comp.lang.c++
Subject: Can someone post a list of any ftp sites for c++ stuff
Keywords: c++ ftp
Date: 27 Jan 93 18:40:18 GMT
Organization: University of California, San Diego


   Hi, I'm looking for some ftp sites that concentrate
   on c++ information/source, etc.

   Any hints would be appreciated.

      Thanks very much -- alann


   alann lopes:        alopes@ucsd.edu       -- internet
   (619) 534-5438      ALOPES@UCSD           -- bitnet
Newsgroups: comp.lang.c++
From: maxtal@extro.ucc.su.OZ.AU (John MAX Skaller)
Subject: Re: operators
Keywords: operators,inheritance
Organization: MAXTAL P/L C/- University Computing Centre, Sydney
Date: Wed, 27 Jan 1993 14:20:15 GMT

In article <C197Co.JH4@cs.uiuc.edu> pjl@cs.uiuc.edu (Paul Lucas) writes:
>In <1993Jan21.165621.16704@jussieu.fr> clerc@gla.ecoledoc.ibp.fr writes:
>
>
>>Id like to express in C++ the fact that operators < <= >= can
>>be defined using operators > and = (eg: a < b  is b > a)
>>I would use a class MathObj (that would implement < <= >= using > and =)
>>and derive my classes from it, redifining only the basic operators > and =
>
>	I assume you meant: "in terms of operators > and =="
>							  ^
>>How can I WRITE that in C++ ? (no template solution please)
>
>	Make < and == virtual in MathObj.

	Paul: it doesnt work. OO cant handle relations.
There is no way to even declare an abstract relation in C++
(since it doesn't have garbage collection).

	Comparison operators are usually based on static
type and thus cant be virtual. A solution like the recently
posted solution for assignment slicing may work: but thats
even *more* effort than just declaring all the comparisons
(which the original poster wanted to avoid)


-- 
;----------------------------------------------------------------------
        JOHN (MAX) SKALLER,         maxtal@extro.ucc.su.oz.au
	Maxtal Pty Ltd, 6 MacKay St ASHFIELD, NSW 2131, AUSTRALIA
;------ SCIENTIFIC AND ENGINEERING SOFTWARE ---ph:  2 799 8223 --------
Newsgroups: comp.lang.c++
From: mat@mole-end.matawan.nj.us
Subject: Re: Is (p) instead of (p!=NULL) portable?
Organization: :
Date: Tue, 26 Jan 1993 18:27:46 GMT

In article <1993Jan26.091708.11214@cbfsb.cb.att.com>, nh@cbnewsg.cb.att.com (nicholas.hounsome) writes:
> From article <1993Jan25.125627.29030@ugle.unit.no>, by robert@alkymi.unit.no (Robert Schmidt):

> > In PC C's, the NULL pointer is defined with a bit pattern of all zero's,
> > and the constructs 
> >       if (p)
> > and
> >       if (!p)
> > checks for NULL and non-NULL respectively.  Is this portable to *all*
> > platforms?

> It is NOT portable for C.

It _is_ portable for any C which conforms either to the standard or to
the old K&R `de facto standard.'

> It is portable for C++ which is the group that you have posted to -
> did you mean to?

> #define NULL (void*)0
> if(p==NULL)
 
> This is WRONG in C++ and right in C.
> (char*)0 is even worse in C++.

It is also wrong in C.  See the comp.lang.c FAQ, a Truly Excellent document.
-- 
 (This man's opinions are his own.)
 From mole-end				Mark Terribile

 mat@mole-end.matawan.nj.us, Somewhere in Matawan, NJ
Newsgroups: comp.lang.c++
From: pat@frumious.uucp (Patrick Smith)
Subject: Re: Overloading Operators
Date: Tue, 26 Jan 1993 17:57:38 GMT
Reply-To: uunet.ca!frumious!pat
Organization: None

Some time ago, I wrote:
|>> Like Nikki, I can't think of any way in which a const or volatile
|>> reference differs from a plain reference.  Is there a difference?

Actually, if I remember correctly, Nikki only mentioned const
references.  The blindness about volatile references was mine alone.


fjh@munta.cs.mu.OZ.AU (Fergus James HENDERSON) writes:
|I agree with the earlier statements that const references don't differ from
|plain references. But I can see that a volatile reference might differ from
|a plain reference, although I see no useful way of using this difference.
|
|	int i;
|	int & volatile ref = i;		// 'volatile' here prevents compiler
|					// from optimizing away 'ref' if
|					// it is not used?

Yes, of course.  Also, uses of volatile references can't be
optimized away (and multiple uses can't be optimized into a
single pointer fetch from memory).  Silly of me to miss this.

-- 
Patrick Smith
uunet.ca!frumious!pat
pat%frumious.uucp@uunet.ca
Newsgroups: comp.lang.c++
From: xinxu@stam.qe.bell.ca (Xin Xu)
Subject: Re: Why is C++ not considered a true OOL?
Organization: Telecom Canada E.D.S.
Distribution: na
Date: Fri, 22 Jan 1993 19:26:29 GMT

In article <1993Jan20.222840.16439@ucc.su.OZ.AU>, maxtal@extro.ucc.su.OZ.AU (John MAX Skaller) writes:
|> In article <19JAN199315162645@trentu.ca> ayounes@trentu.ca (Amro Younes, Trent University, C.C. #314, Peterborough, ON, Canada K9J 7B8. (705) 749-0391) writes:
|> >I'm doing a presentation of C++ for a Comparative Languages course.  During 
|> >my readings, the authors mentioned that C++ isn't a true object oriented 
|> >language, but they never said why.  This is ofcourse in comparison with 
|> >smalltalk.  Does anyoune know why this isn't the case.  Could it be that C++ 
|> >does not meet the definition of what true OOPs are supposed to be.  The 
|> >books I have look at C++ from C, and they give a definition of what OOPs 
|> >are supposed to look like, and C++ meets all there criteria.  But later 
|> >they say it isn't a true OOL.
|> >
|> 
|> 	I say C++ is class oriented, not object oriented.
|> 	C++ doesnt have garbage collection.
|> 	C++ doesn't (really) allow dynamic typing.
|> 
|> This latter point might be a crucial distinction: a true Object
|> Oriented language has no classes and no types, it just has
|> objects that are all different, so method calling must
|> be dynamic.
|>

    class is a useful mechnism for the abstraction of messy object world.
C++ class can be used to capture many kinds of relationships among objects,
and also the hierarchical relationships among classes. All these are very
useful for handling the complexity of the real world problems. 
    If a true object-oriented language has no class, no type, there should be
something else for ABSTRACTION, for example, AI people use different 
methods and terms for real world modeling.  A OOP language  without 
abstraction mechnism is of little use. 

-- 
|> ;----------------------------------------------------------------------
|>         JOHN (MAX) SKALLER,         maxtal@extro.ucc.su.oz.au
|> 	Maxtal Pty Ltd, 6 MacKay St ASHFIELD, NSW 2131, AUSTRALIA
|> ;------ SCIENTIFIC AND ENGINEERING SOFTWARE ---ph:  2 799 8223 --------
Date: Wednesday, 27 January 1993 23:29:48 EST
X-Mailer: TMail version 1.14R
From: "Tim Triemstra" <empath@ais.org>
Organization: Empath Software
Subject: Re: Compiling a string class
Newsgroups: comp.lang.c++
Distribution: world

In <1993Jan27.083611.14194@netcom.com>, erc@netcom.com (Eric Smith)  wrote:
   >
   >In article <765370d7928835t20@roofus.ann-arbor.mi.us> "Tim Triemstra" <empath@ais.org> writes:
   >>ztc -mx -c str.cpp strsearch.cpp regx.cpp match.cpp dynstream.cpp
   >>ztcpp1x -DDOS386 -3 -ms -oC:\UTILS\TEMP\ztc_1.tmp str.cpp
   >>   str(const char *, const str::substr& );
   >>                                      ^
   >>str.h(123) : Error: ')' expected
   >
   >What Zortech version is it?

Zortech C++ 3.04

Tim.

-------------------------------------------------------
| When the end comes, there will be two men standing: |
|   Me, and the guy I gotta kill.   - Gosh I'm EVIL   |
------ Tim Triemstra ------------- empath@ais.org -----
Newsgroups: comp.lang.c++
From: davidk@mcil.comm.mot.com (David Kramer)
Subject: Re: Need help justifying C++ over Ada
Organization: Motorola Communications Israel Ltd., Tel Aviv
Date: Sun, 24 Jan 1993 13:21:49 GMT

In article <1993Jan21.130427.12611@afit.af.mil>, cbrooks@afit.af.mil (Christopher L Brooks) writes:
|> davidk@mcil.comm.mot.com (David Kramer) writes:
|> > - With C++ you can easily plug in already existing C code - including
|> >   #include files.
|> 
|> I'm not sure whether your argument here is re-use/modification or just
|> interfacing.  We've never had any problems here talking to C or C++
|> from Ada - in fact, we do it all the time.  We've always found it
|> easiest to make the Ada program the "main" program however.
|> 

Ada does make it easy to interface with object files of other languages.
What I was refering to (and I admit I did not make myself clear) is the
ability to use/reuse existing definitions (#defines, enums, structs, 
typedefs...) directly. 

For instance, I worked on a project which was developed in C where all the
definitions that were used to interface to an external program were defined 
in one .h file. I wrote a simulator in C++ for the other side of that interface,
and was able to use that .h file directly. This insured that both sides
of the interface would have consistant definitions and that if something
changed in the definitions 'make' would rebuild both programs. 

If I wanted to write the simulator in Ada I would have had to rerepresent
those definitions in Ada - which would complicate maintenance (a change to
the .h file would necesitate a change to the Ada code).

Personally, I would prefer Ada for most applications. But the advantages 
of C++ sometimes outweigh other considerations.

-- 
[  David Kramer                       |  INTERNET: davidk@mcil.comm.mot.com  ]
[ Motorola Communications Israel Ltd. |  Phone (972-3) 565-8638 Fax 565-8754 ]


Newsgroups: comp.lang.c++