TIP: Click on subject to list as thread! ANSI
echo: c_plusplus
to: ROGER SCUDDER
from: BALOG PAL
date: 1997-09-14 22:28:00
subject: Worked this out

                             Hi, Roger Scudder!
On 12 Sep 97  15:25:00 you wrote to Kurt Kuzba
 KK> class MathCalc
 KK> {
 KK> private:
 KK>    int iVar1, iVar2, iResult;
 RS> Why do you code the private keyword when the data is private
 RS> by default.  Is this considered good style?
I don't know what is considered, but I generally code that too. It's more
intuitive to me reading back the code, and make the maintainance easier too.
Somtime you have to move the data members between public/prot/priv sections,
or reorder the sections themselves. If you later find more convenient to see
those vars above at the bottom of the class deffinitions, you imply select
and move it. If you omitted the private: you will have to type it in later.
If you have several comment lines at the beginning of the class (and sure you
have them, that is not that simple to keep in mind, some variables you see
are private just 'cos they are at the beginning.
A fat class will commonly have a dozen of such labels, so why omit that one
at the very start.
Paul
... Gentlemen:  Start your debuggers...
--- OS/2 Warp
---------------
* Origin: The FlintStones' Cave in BedRock (2:371/20)

SOURCE: echomail via exec-pc

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.