HDTenEightyP/NetNews huggingface dataset:
From: pvonk@scott.skidmore.edu (Pierre VonKaenel)
Subject: TMenuBox ? in TVision
Organization: Skidmore College, Saratoga Springs NY, 12866
Date: Tue, 28 Jul 1992 12:45:44 GMT

I'm using Borland's Turbo Vision to write a menu program for our
department.  I have a TMenuBar defined with appropriate submenus.
What I need is a sub-submenu (or a pop up menu) and it seems TMenuBox
should do the trick.  Unfortunately, there are no examples for using
this class.  I tried to create is ala TMenuBar (the constructors use
the same types of parameters), but get errors when I do

	*new TMenuBox( TRect[..stuff..], *new TSubMenu(....) ) ...
or	*new TMenuBox( TRect[ ...     ], *new TMenuItem(...) ) ...

It expects a TMenu type for the second parameter.  This is how
TMenuBar is defined, it using TSubMenu works for it.

Even if the above worked, it's not clear how a TMenuBox is started,
since TMenuBar is executed via the initMenuBar function of the
application.

All I want is a popup menu that looks similar to the following (I've
included the menu bar and a submenu for a simplified version)

	| Apps	|  Utils    | ...
	+-------+-----------|--
	|Languages  | <- chosen-
	|Math apps  |           |
	+-----------+           | popup menu results.
                                v
			+------------+
			| Pascal     |
			| Basic	     |
			+------------+


Is TMenuBox the appropriate class to use?

-- 
Pierre von Kaenel	| Skidmore College	     | pvonk@scott.skidmore.edu
Math & CS Dept.		| Saratoga Springs, NY 12866 | (518)584-5000 Ext 2391
When asked his position on euthanasia, our local state rep. responded:
"I support youth all over the world."
Xref: sparky comp.lang.c++:11715 comp.windows.x.motif:5291
From: graham@comp.lancs.ac.uk (Graham Dean)
Newsgroups: comp.lang.c++,comp.windows.x.motif
Subject: ParcPlace Objectworks C++
Date: 29 Jul 92 11:56:16 GMT
Organization: Department of Computing at Lancaster University, UK.

We're looking at C++/Motif programming environments and wondered
what peoples impressions where of ParcPlace's Objectworks for C++
(and indeed any other programming environment). We have been using
Objectworks for Smalltalk for some time now, but we're now 
interested in a similar environment for C++.

We need - A decent source level debugger, where the source code 
will generally be a mixture of C++/Unix/X/Motif. Browsers,
Libraries etc. are of secondary importance at present, but 
this situation will no doubt change with expanded use of C++
throughout our research group.

Ob: I will, of course, summarise if enough interest is shown.

Thanks,

Graham Dean
-- 
********************************************************************
internet :  graham@comp.lancs.ac.uk    	   Graham Dean		   *
arpa     :  graham%lancs.comp@ucl.cs       Department of Computing *
janet    :  graham@uk.ac.lancs.comp   	   Lancaster University    *
Newsgroups: comp.lang.c++
From: kreiser@aostra.uucp (Barry Kreiser)
Subject: C++ and RPC's
Organization: A.O.S.T.R.A.
Date: Tue, 21 Jul 92 22:25:27 GMT


Q1 - Does anyone know of C++ libraries for RPC's.  
Q2 - Does it come with SOLARIS 2.0? 
Q3 - Is there a RPCGEN++ program anywhere?

Please Reply

Thank you...!!! 8)

-- 
=====================================================
DISCLAIMER: My opinions are my own ....

Barry Kreiser
From: jbuck@forney.berkeley.edu (Joe Buck)
Newsgroups: comp.lang.c++
Subject: Re: strdup() Was: Re: Renew?
Date: 29 Jul 1992 19:54:15 GMT
Organization: U. C. Berkeley
NNTP-Posting-Host: forney.berkeley.edu

In article <1992Jul29.155252.7632@cbnewsk.cb.att.com> hansen@pegasus.att.com (Tony L. Hansen) writes:
>By the way, at least one person has posted a poor version of strdup() which
>didn't check the return value of new. Here's my contribution. As you can
>see, it is a very straightforward function:
>[ nstrdup that checks value of new ]

Sorry, Tony, I disagree.  This is the whole reason that exceptions were
added to the language, so we wouldn't have to do this.  In the case of
new failures, there is already a mechanism present: the "new handler".

If nstrdup checks for new returning 0, we then have to check for nstrdup
returning 0, and so on.  Your nstrdup has just passed the problem on to
someone else.

The proper approach is to use set_new_handler establish a handler to catch
new returning 0, and have it either free up some memory or exit the
application cleanly.  Those in memory-poor environments (IBM-PCs and
such) may disagree.

Given this philosophy, my version was just fine, thank you.



--
Joe Buck	jbuck@ohm.berkeley.edu
From: ark@alice.att.com (Andrew Koenig)
Newsgroups: comp.lang.c++
Subject: Re: Renew?
Date: 29 Jul 92 14:30:17 GMT
Article-I.D.: alice.23347
Reply-To: ark@alice.UUCP ()
Organization: AT&T Bell Laboratories, Liberty Corner NJ

In article <memo.547224@cix.compulink.co.uk> vadim@cix.compulink.co.uk writes:

> I  agree, that a pointer to original object stored somewhere
> else creates a dangerous situation, but this is still true even if the
> 'operator renew' was built-in in the language. Renew and realloc should
> be always used with caution.  

If renew guarantees to the user that the copy constructor and
destructor will be called for each object moved, that greatly
ameliorates the situation.  It is then sufficient for the user to
get those two functions right, or make them private (which would
prohibit renew on objects of that class).
-- 
				--Andrew Koenig
				  ark@europa.att.com
Newsgroups: comp.lang.c++
From: thicks@fred.Colorado.EDU (Tom Hicks)
Subject: derived class destructors
Originator: thicks@fred
Keywords: destructors, derived class 
Organization: University of Colorado Boulder, OCS
Distribution: usa
Date: Fri, 24 Jul 1992 16:29:30 GMT

Hi -

I am having a problem with a destructors, and I can't find any
examples of how to use destructors with derived classes.  I have three classes,
X, Y and Z, such that:

	class Z: public X, public Y { // etc. };

I have destructors for classes X and Y, and when I call the destructor for
Z, I want to also call the X and Y destructors.  I am trying to use

	Z::~Z() : ~X() , ~Y() { // etc. }

but the compiler keeps giving me a syntax error.  I know that this is the
correct syntax for constructors, but is this the proper syntax for destructors?
I have searched Stroustrup's "The C++ Programming Language", but could not
find any useful help on this subject.

Please e-mail responses.  Any help/pointers appreciated.

-------------------------------------------------------------------------
	Tom Hicks
	thicks@fred.colorado.edu           Optoelectronic Computing 
	(303) 492 - 2769                    Systems Center, CU-CSU
--------------------------------------------------------------------------
Newsgroups: comp.lang.c++
From: nikki@trmphrst.demon.co.uk (Nikki Locke)
Subject: Efficient 64-bit integer arithmetic
Distribution: world
Organization: Trumphurst Ltd.
Date: Fri, 24 Jul 1992 10:04:18 +0000

I need to implement efficient 64-bit signed integer arithmetic in C++ (or C)
on a machine with a 32-bit long (actually, 60 significant bits + sign
would do fine). 

I need addition, subtraction, multiplication, division, remainder, and 
efficient multiply and divide by 10 (for conversion to/from strings).

I have looked at the bignum package, which implements arbitrary precision,
but I feel the extra constraint of having only 60 significant bits should 
enable a much more efficient implementation to be possible.

Does anyone know of any such code available for anonymous ftp ? Or have 
any suggestions ?

I have a reasonably efficient add, subtract and multiply, (though no doubt
some of the number theorists here could improve them significantly), but 
the divide is currently accomplished by a full 64-bit rotate/subtract 
loop, which I found much faster than the bignum method of estimating the 
answer using floating point. This is almost certainly because I didn't 
have an FP chip in my machine at the time, but I don't want to have to 
insist on an FP chip for acceptable performance.

Thanks in advance,

---
Nikki Locke              |                        | nikki@trmphrst.demon.co.uk
Trumphurst Ltd.          | Tel: +44 (0)691-670318 | nikki@cix.compulink.co.uk
PC and Unix consultancy  | Fax: +44 (0)691-670316 | nikki@kewill.co.uk
Newsgroups: comp.lang.c++
From: joe@proto.com (Joe Huffman)
Subject: Re: C++ for 286's
Organization: Prototronics @ Sandpoint, Idaho
Date: Wed, 22 Jul 1992 19:55:59 GMT
Keywords: c++

mork@yoyo.cc.monash.edu.au (Simon Raik) writes:

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

Borland C/C++ 3.1.

Good environment (or so I'm told -- I always use makefile and my own text
editor).

LOTS of third party support.

Comes with a 286 DOS extender (somewhat crippled, but you can get the
full version from Pharlap).

Templates.

-- 
netcom!proto!joe
joe@proto.com
Newsgroups: comp.lang.c++
From: pault@mlacus.oz.au (Paul Taylor)
Subject: Forcing 4-byte ints with Borland C++ 3.0
Organization: ACUS Australian Centre for Unisys Software, Melbourne
Date: Mon, 27 Jul 1992 07:29:50 GMT

Is it possible to force Borland C++ 3.0 to use 4 byte integers,
rather than 2 ?

ie. I need...

       sizeof(int)==4

This is being dictated by the need for binary compatibility of a 
data file between PC and an 80*86 Unix box.

Manual references, anyone?
Newsgroups: comp.lang.c++
From: maxtal@extro.ucc.su.OZ.AU (John MAX Skaller)
Subject: Re: Language extensions for run-time type identification
Organization: MAXTAL P/L C/- University Computing Centre, Sydney
Date: Sat, 25 Jul 1992 18:12:14 GMT

In article <1992Jul25.070247.3925@uunet.uu.net!mole-end> mat@uunet.uu.net!mole-end writes:
>
>Eh?  Under the current proposal, if the class has no  ~const  members
>AND IF IT HAS NO CONSTRUCTORS OR DESTRUCTORS it can be placed in ROM.
>Complex  should probably have constructors or destructors, so it is left
>out, but that has nothing to do with Humpty Alice Dumpty.
>
>On the other hand, under the current proposal, with no ~const members,
>casting away const for classes can be reduced to the unsupported sort
>of thing you are asking for.  The class declaration, by default, supports
>bitwise const; with the appropriate declarations the meaning of const is
>weakened for that class.  It's up to the implementor of the class.

	Can you have BOTH ~const member variables AND functions?

>
>What more do you need?  

	It would be nice to be able to have constructors for
romable objects. They would have to be restricted to the sorts
of things that the COMPILER can EXECUTE at compile time.

	ROM double x=sin(1.3);
	ROM complex y=sin(complex(2,3.4));

I guess this is too much to ask for, but you did ask 
"What more do you need". I dont need the above but it would
be desirable (saves me calculating the complex sine on
a calculator, and constructing an image and then
fiddling with the placement form of operator new)



-- 
;----------------------------------------------------------------------
        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++,comp.std.c++
From: dwo1@gte.com (Donald W. Ottens)
Newsgroups: comp.lang.c++
Subject: c++ tutoring
Keywords: tutoring
Date: 29 Jul 92 14:56:15 GMT
Distribution: ne
Organization: GTE Laboratories Incorporated, Waltham MA

Is anyone available for some c++ tutoring during the next week?  

I am in the Boston area and
need some c++ guidance.  Will pay the going rates $!.  

Please respond to:  don ottens
                    wk (617) 466-2071  (until 4pm, then after 7:30PM tonight)
                    hm (617) 646-8402  (better to call at work)

Thanks.

don o
dwo1@gte.com
Newsgroups: comp.lang.c++
From: maxtal@extro.ucc.su.OZ.AU (John MAX Skaller)
Subject: Re: Power Operator vs NANs
Organization: MAXTAL P/L C/- University Computing Centre, Sydney
Date: Wed, 22 Jul 1992 00:29:07 GMT

In article <TMB.92Jul21215436@arolla.idiap.ch> tmb@idiap.ch writes:
>In article <14hm92INNrt0@agate.berkeley.edu> jbuck@forney.berkeley.edu (Joe Buck) writes:
>
>   One could still implement the comparison operators that you
>   describe [i.e., the new NCEG comparison operators] that consider
>   the possibility of unordered values (NaNs) and have the same syntax
>   work on machines that don't have NaNs.  It would just be that the
>   test for two values to be unordered would never come out true on
>   such machines.
>
>I remain unconvinced (even after having read the NCEG document),
>however, that an algorithm that needs to rely on the new NCEG
>comparison operators will do anything reasonable on architectures that
>don't support NaN's or Inf's.
>
>Frankly, I'd much rather have an error flagged at compile time
>("isnan() not defined") than wonder why some numerical algorithm out
>of some library goes into an infinite loop once in a blue moon when I
>compile it on my non-IEEE machine.
>
>					Thomas.
>

	The solution is to introduce an IEEE float type.
If you have a IEEE machine, its the same as ordinary float.
Constants convert to either type.

	If you dont have an IEEE machine, and you use
an IEEE type, well it just wont compile. You program cannot be
used. Thats precisely what you would want: you algorithm
relies on IEEE, so it shouldn't work on a non-IEEE machine.
If you don't need any IEEE features, well, dont
use IEEE and make your code non-portable.

	How else can it be: if you use special features like INF,
then you must have support for INF. 

	The effect of this is that IEEE programs will be 100%
portable between IEEE machines, whereas they won't run
at all on non-IEEE machines.

	And programs using float will be just as portable as
they are now (what ever that is:-)
 

-- 
;----------------------------------------------------------------------
        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: teb@dendron.forestry.umn.edu (Thomas E. Burk)
Subject: BORLAND C++ w/ObjWin -- linker error with global variables
Keywords: BORLAND LINKER
Reply-To: teb@dendron.forestry.umn.edu (Thomas E. Burk)
Organization: University of Minnesota
Date: Fri, 24 Jul 1992 22:38:01 GMT

I declared several variables and functions globally with Borland C++ with
ObjectWindows.  Using the small memory model option, I receieved a message
from the linker saying segment_TEXT exceeded 64K.  My Windows C++ application
did compile successfully but failed to link because of a segmentation fault.

To resolve that, I attempted to declare a global pointer to a class that
encapsulated all the 'global' variables and functions.  The application
linked successfully under the large memory model but failed upon execution with
a "general protection fault" error before the global pointer was constructed.

How can I fix this problem?  Perhaps by declaring the global pointer as a far
pointer?  How about increasing the stack/heap size and coercing the variables
and pointers to be placed in the heap?


Man V. Nguyen
University of Minnesota
Internet: mnguyen@mercury.forestry.umn.edu 

--
Thomas E. Burk
University of Minnesota
Internet: teb@dendron.forestry.umn.edu
BITNet: teburk@umnacvx.bitnet
USFS DG: t.burk:x400
Newsgroups: comp.lang.c++
From: steve@taumet.com (Steve Clamage)
Subject: Re: Conversion operators and typedef names
Keywords: Microsoft C++ new error bug
Organization: TauMetric Corporation
Date: Wed, 22 Jul 1992 22:16:18 GMT

krc@wam.umd.edu (Kevin R. Coombes) writes:

>... a conversion operator to a typedef name ...  should you do it?

>class MyTime {
>  ...
>  operator time_t(void);   // Does this make you queasy?
>  ...
>};

If the conversion operator does not make any assumptions about the
actual type of time_t it should be perfectly OK.

Example:

	#include <time.h>

	class MyTime {
	    struct tm t;	// the broken-down time
	public:
	    operator time_t() { return ::mktime(&t); }
	    ...
	};
-- 

Steve Clamage, TauMetric Corp, steve@taumet.com
Vice Chair, ANSI C++ Committee, X3J16
From: mauricio@DCC.UNICAMP.BR (Mauricio Fernandez)
Newsgroups: comp.lang.c++
Subject: Assigning a derived class to a base class.
Date: 27 Jul 92 18:07:11 GMT
X-Unparsable-Date: Mon, 27 Jul 92 9:26:51 GMT-3:00

Hello, I'm posting this message through e-mail since I have no direct
access  to usenet. I guess the following topic has already been
discussed in this group.

Suppose you have a base class B with some virtual function F.

class B{ ...

virtual F();

}

and a derived class from B that redefines F.

class D:B{... (or class D: public B{...)

F();

}

Now, when you assign an instance of class D to a variable declared to
be of type B the assigned variable holds a pure B instance, this means
that F calls will be resolved to the base class code.

This turns out to be dramatic in the following case. You want to build
a linked list supporting different types (a single instance of the
list should have nodes of different types) so you create a generic
node

class generic_node{
	generic_node *next, *previous;
public:
	virtual void Print(){
		cout << "Sorry, I have no value to print for you\n";
	}
};

And then you create the specific node types

class int_node:public generic_node{
	int value;
public:
	virtual void Print(){
		cout << value << '\n';
	}
};

class string_node:public generic_node{
	char *str;
public:
	virtual void Print(){
		cout << value << '\n';
	}
};

This works ok as long as I don't try to make a copy of a list.
Is there an elegant way to cope with this? I couldn't arrive to 
a satisfactory solution. 

Please, reply-me via e-mail. Thanks in advance.

___________________________________________________________________
                                                Mauricio Fernandez
                                           mauricio@dcc.unicamp.br


Newsgroups: comp.lang.c++
From: nagle@netcom.com (John Nagle)
Subject: Re: New C++ type: boole
Date: Mon, 27 Jul 92 18:11:18 GMT
Organization: Netcom - Online Communication Services  (408 241-9760 guest) 

fjh@munta.cs.mu.OZ.AU (Fergus James HENDERSON) writes:
>>Programmers in Fortran have no conceptual
>>problem with .TRUE.  

>.TRUE. is fine

      FORTRAN uses constructs like ".GT." and ".TRUE." because when John
Backus was designing the language in 1954, nobody knew how to break up
a line into lexical tokens, and there was much confusion over whether
one could write "I=1" or had to write "I = 1".  The solution chosen
was to completely ignore spaces in FORTRAN statements.  This resulted
in some rather wierd syntax as the language was extended, because
any syntax that could result in two words in sequence had to be 
parseable with no space or delimiter between the words.  Hence,
".GT." and ".TRUE.", so that "I.GT.J" was parsable.

      But it's not a good rationale for using wierd syntax in a modern design.

					John Nagle
From: Oliver.Otto@f2006.n241.z2.fidonet.org (Oliver Otto)
Newsgroups: comp.lang.c++
Subject: Probs with the GNU C++,Libs (OS/2)
Date: 19 Jul 92 14:20:36 GMT
Article-I.D.: fast.711745200.F00001

Hello all!



Oliver
Newsgroups: comp.lang.c++
From: time@cix.compulink.co.uk (Tim Evans)
Subject: Spelling Checkers....                   
Cc: time@cix.compulink.co.uk
Reply-To: time@cix.compulink.co.uk
Date: Mon, 27 Jul 1992 23:37:40 +0000

Hi. 
 
I have been asked to write a spelling checker, I have get a list of word but 
i am looking for a fast/efficient/small method of codeing the word list, any 
suggestions or pointers to books/code samples would be most wellcome. 
 
time@cix.compulink.co.uk 

>>>MATRIX version  1.20d
Newsgroups: comp.lang.c++,comp.std.c++
From: mat@uunet.uu.net!mole-end
Subject: Re: Language extensions for run-time type identification
Summary: Once more, dear fellows, into the breach
Organization: :
Date: Tue, 28 Jul 1992 09:44:28 GMT

In article <1992Jul27.173614.8320@cadsun.corp.mot.com>, shang@corp.mot.com (David (Lujun) Shang) writes:
> In article <1992Jul26.014223.6153@uunet.uu.net!mole-end>  
> mat@uunet.uu.net!mole-end writes:

> > 	Derivation is only useful when used properly with virtualization.
> I disagree. Without virtualization, derivation is still useful in code reuse.  
Usable, but unsafe.

> Virtualizaton only makes derivation more powerful in express polymorphism.
> > 	Virtualization is only meaningful in the context of derivation.
> I disagree.  Virtualization actually is a kind of specialization. In
> addition to virtual functions, we can also have vitual types and virtual
> constants. ...

This is comp.{lang,std}.c++, not comp.object.  Your paragraph does not
describe C++; it does not describe something that is C++ + <delta> .  (In
comp.object, this might be an interesting journey upon which to embark.)

> > 	Only derivation can make use of RTTI.

> I disagree. Derivation needs RTTI does not mean that only derivation needs  
> RTTI. Parameterization needs RTTI too (of cause, it is not the C++ template).

RTTI is only needed when an object can have an apparent type and an actual
type.  In C++, that requires derivation.  Again, these groups talk about
C++ and sometimes about stuff within a <delta> radius of C++.  I believe
you are beyond that <delta>.
 
> >   therefore
> > 	RTTI is only useful in the presence of virtualization.
> Since I agree to none of the assumptions, I cannot agree to the conclusion  
> either.

Not even in the context of C++?

Two is not equal to three, not even for large values of two.  (Grabel's Law)
-- 
 (This man's opinions are his own.)
 From mole-end				Mark Terribile

 uunet!mole-end!mat, Somewhere in Matawan, NJ
Newsgroups: comp.lang.c++,comp.std.c++