Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Please give me your input on my sites change

130 views
Skip to first unread message

chuckeasttom

unread,
Aug 22, 2002, 11:20:13 AM8/22/02
to
First of all I am greatful for all the input I have received in these
newsgroups. Even those of you that where rude, where still helpful:)

I am currently teaching programming II with C++ and have a web site
with links, source code, terms, etc. I would like to here any
suggestions or comment you may have regarding:
1. Content
2. Errors
3. Additional Links

http://www.geocities.com/~chuckeasttom/cclass/

Also, after a lot of helpful suggestions, I have just finished
drastically altering my Visual Basic encryption page, and would like
to hear your opinions.
I have changed the content, added links, and added appropriate caveas.
http://www.geocities.com/~chuckeasttom/vb/Vb.htm

WARNING- Yes I like cute litte JavaScripts and animated gifs on my
pages. If you don't, then the layout may not be appealing to you.

Thanks for your help and your input.

Richard Heathfield

unread,
Aug 22, 2002, 1:12:11 PM8/22/02
to
chuckeasttom wrote:
>
> First of all I am greatful for all the input I have received in these
> newsgroups. Even those of you that where rude, where still helpful:)
>
> I am currently teaching programming II with C++

Good heavens.

> and have a web site
> with links, source code, terms, etc. I would like to here any
> suggestions or comment you may have regarding:
> 1. Content
> 2. Errors
> 3. Additional Links
>
> http://www.geocities.com/~chuckeasttom/cclass/

Your sample program, which begins with the comment "this entire file is
designed simply to show a student how to create a class in C++", doesn't
compile. Even if it did, it returns a non-portable value from main(). I
didn't bother inspecting it more closely.

Borland C++ 5.4 for Win32 Copyright (c) 1993, 1999 Inprise Corporation
chuck.cpp:
Error E2046 chuck.cpp 7: Bad file name format in include directive
Error E2046 chuck.cpp 25: Bad file name format in include directive
Error E2171 chuck.cpp 36: Body has already been defined for function
'main()'
Error E2451 chuck.cpp 37: Undefined symbol 'cout' in function main()
Error E2451 chuck.cpp 38: Undefined symbol 'cin' in function main()
Error E2451 chuck.cpp 48: Undefined symbol 'cout' in function
pointertest(teststruct *)
Error E2451 chuck.cpp 56: Undefined symbol 'cout' in function
regulartest(float)

*** 7 errors in Compile ***

> Also, after a lot of helpful suggestions, I have just finished
> drastically altering my Visual Basic encryption page, and would like
> to hear your opinions.

I thought "This is also called the ceaser cipher, as it was used by
ceasers in ancient rome" was quite funny. The inclusion of source code
is a major improvement. Nice one. (No, I'm afraid I didn't actually read
the source. I'm just kinda presuming it's there, since you link to it.)

--
Richard Heathfield : bin...@eton.powernet.co.uk
"Usenet is a strange place." - Dennis M Ritchie, 29 July 1999.
C FAQ: http://www.eskimo.com/~scs/C-faq/top.html
K&R answers, C books, etc: http://users.powernet.co.uk/eton

Ron Natalie

unread,
Aug 22, 2002, 1:44:07 PM8/22/02
to
chuckeasttom wrote:
> First of all I am greatful for all the input I have received in these
> newsgroups. Even those of you that where rude, where still helpful:)
>
> I am currently teaching programming II with C++ and have a web site
> with links, source code, terms, etc. I would like to here any
> suggestions or comment you may have regarding:
> 1. Content
> 2. Errors
> 3. Additional Links
>
You've got a lot of errors. For instance, the placement of the ++
operator has nothing to do with when it occurs with respect to the
assignment in your example expression.

Your code examples (with exception of the one that just returns
0) are all non-standard and non-portable.

Your definitions could certainly use the definition of
"expression". Your explanation of for loops would not
likely be understood by someone who has never encountered
C's goofy syntax for such.

In general, the page is pretty weak...in three pages you purport
to provide C++ (Including exceptions and Microsoft dialogs)?
You talk about pointers and their
relation to structs without ever introducing the concept of
structs first.

I recommend that you actually learn something about C++ before
you purport to teach it to the unsuspecting masses (of course,
that certainly hasn't ever stopped certain text book authors).

Donovan Rebbechi

unread,
Aug 22, 2002, 5:09:00 PM8/22/02
to
In article <46fa0e70.02082...@posting.google.com>, chuckeasttom
wrote:

> First of all I am greatful for all the input I have received in these
> newsgroups. Even those of you that where rude, where still helpful:)
>
> I am currently teaching programming II with C++ and have a web site
> with links, source code, terms, etc. I would like to here any
> suggestions or comment you may have regarding:
> 1. Content
> 2. Errors
> 3. Additional Links
>
> http://www.geocities.com/~chuckeasttom/cclass/

(*) THere's no "Evaluation operator". Should be "equality operator".

(*) You don't define what a "definition" or an "expression" is.

(*) The explanation of for loops and conditional branching is inadequate.
For example, you don't say what the else does, and don't explain that it's
optional.

(*) itoa is not ansi C++

(*) the behaviour of ++x vs x++ has to do with the return values of those
functions, it has nothing to do with the "order" of operations.

(*) strcpy should not be used unless you know the destination is large enough.
Use strncpy instead. If you only introduce one function, use the safer one.

(*) C-style IO functions should probably be dumped in favor of std::string
anyway

(*) Exception handling is more complicated than this (-;

(*) why do you have two lousy explanations of if/then/else and for ? One
good explanation would be better.

(*) There is no ANSI headercalled iostream.h, and time.h is deprecated.
Use <iostream> and <ctime> instead.

(*) You need to handle namespace issues when you do that.

(*) cin >> name where name is a character array is broken code. It results in
undefined behaviour if the user enters more than sizeof(name) consecutive
characters. Use a std::string. Or if you must use arrays, use the getline
function.

(*) what are your try/catch blocks there for ? And what kind of message is
"you have had an error" ? division doesn't throw. And why are you catching
exceptions and printing to the console in a utility function (like dividenum)?

(*) why are you using classes and structs without saying what they are ?

You use, but don't define:

member data
member functions
public
private
constructor

The pointer discussion is a little better, but you could explain that

ptr->member
is the same as
(*ptr).member

--
Donovan

Randy Birch

unread,
Aug 22, 2002, 5:13:15 PM8/22/02
to
But otherwise its great, right <g>.

--

Randy Birch
MVP Visual Basic
http://www.mvps.org/vbnet/
Please respond only to the newsgroups so all can benefit.


"Donovan Rebbechi" <elf...@panix.com> wrote in message
news:slrnamaknc....@panix2.panix.com...

Jack Klein

unread,
Aug 22, 2002, 9:58:33 PM8/22/02
to
On 22 Aug 2002 08:20:13 -0700, chucke...@yahoo.com (chuckeasttom)
wrote in comp.lang.c++:

The C++ section is littered with errors, and poor formatting to boot.
Did you actually view this in an HTML browser? Putting different
number of ordinary space characters between a <P> tag and the first
printable character does not produce varying indents in HTML.

The very first item in the code.htm frame is wrong. There is no
"itoa" function in ANSI C++.

First learn a little bit about HTML and how to put together an
intelligible web page. Then learn the subject matter you want to put
on your page before you actually put it their and expose it to the
public.

--
Jack Klein
Home: http://JK-Technology.Com
FAQs for
comp.lang.c http://www.eskimo.com/~scs/C-faq/top.html
comp.lang.c++ http://www.parashift.com/c++-faq-lite/
alt.comp.lang.learn.c-c++ ftp://snurse-l.org/pub/acllc-c++/faq

chuckeasttom

unread,
Aug 22, 2002, 10:41:54 PM8/22/02
to
Richard Heathfield <bin...@eton.powernet.co.uk> wrote in message news:<3D651B6B...@eton.powernet.co.uk>...

> chuckeasttom wrote:
> >
> > First of all I am greatful for all the input I have received in these
> > newsgroups. Even those of you that where rude, where still helpful:)
> >
> > I am currently teaching programming II with C++
>
> Good heavens.

What exactly do you mean by that?


>
> > and have a web site
> > with links, source code, terms, etc. I would like to here any
> > suggestions or comment you may have regarding:
> > 1. Content
> > 2. Errors
> > 3. Additional Links
> >
> > http://www.geocities.com/~chuckeasttom/cclass/
>
> Your sample program, which begins with the comment "this entire file is
> designed simply to show a student how to create a class in C++", doesn't
> compile. Even if it did, it returns a non-portable value from main(). I
> didn't bother inspecting it more closely.
>

An int is not really a non portable value...

> Borland C++ 5.4 for Win32 Copyright (c) 1993, 1999 Inprise Corporation
> chuck.cpp:
> Error E2046 chuck.cpp 7: Bad file name format in include directive
> Error E2046 chuck.cpp 25: Bad file name format in include directive
> Error E2171 chuck.cpp 36: Body has already been defined for function
> 'main()'
> Error E2451 chuck.cpp 37: Undefined symbol 'cout' in function main()
> Error E2451 chuck.cpp 38: Undefined symbol 'cin' in function main()
> Error E2451 chuck.cpp 48: Undefined symbol 'cout' in function
> pointertest(teststruct *)
> Error E2451 chuck.cpp 56: Undefined symbol 'cout' in function
> regulartest(float)
>
> *** 7 errors in Compile ***


Not sure what your compiling problem is. The only include file is
<iostream.h> and cin and cout are pretty standard with that. I have
compiled the coe with two different compilers...

chuckeasttom

unread,
Aug 22, 2002, 10:55:46 PM8/22/02
to
Ron Natalie <r...@sensor.com> wrote in message news:<3D6522E7...@sensor.com>...

> chuckeasttom wrote:
> > First of all I am greatful for all the input I have received in these
> > newsgroups. Even those of you that where rude, where still helpful:)
> >
> > I am currently teaching programming II with C++ and have a web site
> > with links, source code, terms, etc. I would like to here any
> > suggestions or comment you may have regarding:
> > 1. Content
> > 2. Errors
> > 3. Additional Links
> >
> You've got a lot of errors. For instance, the placement of the ++
> operator has nothing to do with when it occurs with respect to the
> assignment in your example expression.
>
I believe that you are simply wrong on this one. And so do few other
people:
http://www.geocities.com/sstutor/operators.htm
http://cpptips.hyperformix.com/cpptips/inc
As well as about a half dozen C++ books on my shelf
Placeing the operator prior to the variable in question makes it a
prefix operator and the operation will occur first. Placing it after
makes in a postfix operator and it happens after the other operations.

> Your code examples (with exception of the one that just returns
> 0) are all non-standard and non-portable.

What exactly is non standard and no portable?

>
> Your definitions could certainly use the definition of
> "expression". Your explanation of for loops would not
> likely be understood by someone who has never encountered
> C's goofy syntax for such.

OK that might be a point


>
> In general, the page is pretty weak...in three pages you purport
> to provide C++ (Including exceptions and Microsoft dialogs)?
> You talk about pointers and their
> relation to structs without ever introducing the concept of
> structs first.


>
> I recommend that you actually learn something about C++ before
> you purport to teach it to the unsuspecting masses (of course,
> that certainly hasn't ever stopped certain text book authors).


Or perhaps you ought to not simply be an asshole....but thats probably
not possible for you. I have written professional C++ code for
years...and that code is standard and compiles under multiple
compilers...

Richard Heathfield

unread,
Aug 23, 2002, 3:46:41 AM8/23/02
to
chuckeasttom wrote:
>
> Richard Heathfield <bin...@eton.powernet.co.uk> wrote in message news:<3D651B6B...@eton.powernet.co.uk>...
> > chuckeasttom wrote:
> > >
> > > First of all I am greatful for all the input I have received in these
> > > newsgroups. Even those of you that where rude, where still helpful:)
> > >
> > > I am currently teaching programming II with C++
> >
> > Good heavens.
>
> What exactly do you mean by that?

I mean that one ought really to learn a language before teaching it.
Well, that's my view.


> > > and have a web site
> > > with links, source code, terms, etc. I would like to here any
> > > suggestions or comment you may have regarding:
> > > 1. Content
> > > 2. Errors
> > > 3. Additional Links
> > >
> > > http://www.geocities.com/~chuckeasttom/cclass/
> >
> > Your sample program, which begins with the comment "this entire file is
> > designed simply to show a student how to create a class in C++", doesn't
> > compile. Even if it did, it returns a non-portable value from main(). I
> > didn't bother inspecting it more closely.
> >
>
> An int is not really a non portable value...

Correct. An int is a type. 1, however, is a value, but not a portable
one when it comes to returning from main().

>
> > Borland C++ 5.4 for Win32 Copyright (c) 1993, 1999 Inprise Corporation
> > chuck.cpp:
> > Error E2046 chuck.cpp 7: Bad file name format in include directive
> > Error E2046 chuck.cpp 25: Bad file name format in include directive
> > Error E2171 chuck.cpp 36: Body has already been defined for function
> > 'main()'
> > Error E2451 chuck.cpp 37: Undefined symbol 'cout' in function main()
> > Error E2451 chuck.cpp 38: Undefined symbol 'cin' in function main()
> > Error E2451 chuck.cpp 48: Undefined symbol 'cout' in function
> > pointertest(teststruct *)
> > Error E2451 chuck.cpp 56: Undefined symbol 'cout' in function
> > regulartest(float)
> >
> > *** 7 errors in Compile ***
>
> Not sure what your compiling problem is.

The problem lies not with my compiler but with your ignorance of HTML.

> The only include file is
> <iostream.h>

You're cute. Your program includes no such header. Read your page again.
This time, use a browser, not a text editor.


> and cin and cout are pretty standard with that. I have
> compiled the coe with two different compilers...

You have a compiler that will accept #include without a header name
following it? Neat. What does it do, make stuff up?

<snip>

Richard Heathfield

unread,
Aug 23, 2002, 4:08:48 AM8/23/02
to
chuckeasttom wrote:
>
> Ron Natalie <r...@sensor.com> wrote in message news:<3D6522E7...@sensor.com>...
> > chuckeasttom wrote:
> > > First of all I am greatful for all the input I have received in these
> > > newsgroups. Even those of you that where rude, where still helpful:)
> > >
> > > I am currently teaching programming II with C++ and have a web site
> > > with links, source code, terms, etc. I would like to here any
> > > suggestions or comment you may have regarding:
> > > 1. Content
> > > 2. Errors
> > > 3. Additional Links
> > >
> > You've got a lot of errors. For instance, the placement of the ++
> > operator has nothing to do with when it occurs with respect to the
> > assignment in your example expression.
> >
> I believe that you are simply wrong on this one. And so do few other
> people:
> http://www.geocities.com/sstutor/operators.htm
> http://cpptips.hyperformix.com/cpptips/inc
> As well as about a half dozen C++ books on my shelf

What does ISO/IEC 14882:1998 say? The opinions of URLs and books and
stuff are neither here nor there. What matters is what the language
definition says.


> Placeing the operator prior to the variable in question makes it a
> prefix operator and the operation will occur first. Placing it after
> makes in a postfix operator and it happens after the other operations.

Is that what the Standard says? Remember, you've been told you're wrong.
If you want people to think you're right after all, you need to *prove*
it (or get someone to prove you wrong). I'm sure Ron will oblige with
the latter if need be.

>
> > Your code examples (with exception of the one that just returns
> > 0) are all non-standard and non-portable.
>
> What exactly is non standard and no portable?

Fair question. Well, I do Usenet offline, but I have one of your pages
displayed in my browser (a remnant of my failed search just now for that
++ explanation), so I'll have to do the best I can with that:

#include < iostream.h >
#include < time.h>
int main ()
{
time_t rawtime;

time ( &rawtime );
cout << "Current date and time is: "<< ctime (&rawtime);
return 0;
}

(Oh, by the way, where did you learn to indent like that? It could
become all the rage - like atonal music or non-rhyming poetry.)

Now, when I give this to Borland, it says:

D:\var\scratch>bcc32 chuck2.cpp


Borland C++ 5.4 for Win32 Copyright (c) 1993, 1999 Inprise Corporation

chuck2.cpp:
Error E2209 chuck2.cpp 1: Unable to open include file ' iostream.h '
Error E2209 chuck2.cpp 2: Unable to open include file ' time.h'
Error E2451 chuck2.cpp 5: Undefined symbol 'time_t' in function main()
Error E2379 chuck2.cpp 5: Statement missing ; in function main()
Error E2268 chuck2.cpp 7: Call to undefined function 'time' in function
main()
Error E2451 chuck2.cpp 7: Undefined symbol 'rawtime' in function main()
Error E2451 chuck2.cpp 8: Undefined symbol 'cout' in function main()
Error E2268 chuck2.cpp 8: Call to undefined function 'ctime' in function
main()
*** 8 errors in Compile ***


You really do need to get a *good* C++ book. The ones you have appear to
be broken.


>
> >
> > Your definitions could certainly use the definition of
> > "expression". Your explanation of for loops would not
> > likely be understood by someone who has never encountered
> > C's goofy syntax for such.
>
> OK that might be a point
> >
> > In general, the page is pretty weak...in three pages you purport
> > to provide C++ (Including exceptions and Microsoft dialogs)?
> > You talk about pointers and their
> > relation to structs without ever introducing the concept of
> > structs first.
>
> >
> > I recommend that you actually learn something about C++ before
> > you purport to teach it to the unsuspecting masses (of course,
> > that certainly hasn't ever stopped certain text book authors).
>
> Or perhaps you ought to not simply be an asshole....

He has given you good crits, and you respond with rudeness. Why should
he bother helping you in future?


> but thats probably not possible for you.

Check the mirror.

> I have written professional C++ code for years...

No, you haven't. You just think you have. What you have actually written
appears to be amateurish and out-of-date, judging by the code examples
on your Web site.


> and that code is standard and compiles under multiple compilers...

Then why doesn't your tutorial code compile under either Borland or g++?
Neither compiler could be considered obscure. For the Borland reaction
to your code, see above. And g++?

[rjh@arc11] /home/rjh/scratch > g++ -W -Wall -ansi -pedantic -O2 -o
chuck2 chuck2.cpp
chuck2.cpp:1: iostream.h : No such file or directory
chuck2.cpp:2: time.h: No such file or directory
[rjh@arc11] /home/rjh/scratch > ls chu*
chuck2.cpp

See? Even g++ refuses to compile it.

Now please, either apologise to Ron for insulting him, or crawl back
into your cess-pit and shut up about C++ forever. I don't care which.

Per Strömgren

unread,
Aug 23, 2002, 7:42:23 AM8/23/02
to
Chuck,

If you use the <PRE> and </PRE> HTML tags around your C(++) code most
of these errors wouldn't show up. The web browsers make a mess of your
code. Use the PRE tag and the life will be easier for the people who
actualy tries your code.

Having said that, some of the mess is your fault, it seems, having
listened to our collegues around here...

Per.

chuckeasttom

unread,
Aug 23, 2002, 8:16:53 AM8/23/02
to
Donovan Rebbechi <elf...@panix.com> wrote in message news:<slrnamaknc....@panix2.panix.com>...
> In article <46fa0e70.02082...@posting.google.com>, chuckeasttom
> wrote:
> > First of all I am greatful for all the input I have received in these
> > newsgroups. Even those of you that where rude, where still helpful:)
> >
> > I am currently teaching programming II with C++ and have a web site
> > with links, source code, terms, etc. I would like to here any
> > suggestions or comment you may have regarding:
> > 1. Content
> > 2. Errors
> > 3. Additional Links
> >
> > http://www.geocities.com/~chuckeasttom/cclass/
>
> (*) THere's no "Evaluation operator". Should be "equality operator".

I would like a source for that. I have, several times, read
"evalution" and "assignment operator"...


>
> (*) You don't define what a "definition" or an "expression" is.


Hmmm good point. ON the 'terms' section, however expression is
defined...but alas definition is not...


>
> (*) The explanation of for loops and conditional branching is inadequate.
> For example, you don't say what the else does, and don't explain that it's
> optional.
>

good point

> (*) itoa is not ansi C++
>

but it is pretty darn common and useful. I never claimed to only show
students stict ansi C++. THe first 1/2 the class is...but after that
I show them whatever is commonly used.

> (*) the behaviour of ++x vs x++ has to do with the return values of those
> functions, it has nothing to do with the "order" of operations.
>

Well thats just not true. If you put the ++ before the x, it operates
differently than putting it after. That is why they are called prefix
and postfix operators.


> (*) strcpy should not be used unless you know the destination is large enough.
> Use strncpy instead. If you only introduce one function, use the safer one.

Hmmmm I think your right...I will add that.


>
> (*) C-style IO functions should probably be dumped in favor of std::string
> anyway
>

You got me there I still have not shaken all my old C habits..:)


> (*) Exception handling is more complicated than this (-;

You bet...thats is just a raw intro...


>
> (*) why do you have two lousy explanations of if/then/else and for ? One
> good explanation would be better.
>

Suggestions.

> (*) There is no ANSI headercalled iostream.h, and time.h is deprecated.
> Use <iostream> and <ctime> instead.
>

Again my old C habits cropping up... I love that .h...

> (*) You need to handle namespace issues when you do that.
>

Correct. However I never claimed the page was a textbook covering
every aspect of C++. Just a few of the more common little tid bits...


> (*) cin >> name where name is a character array is broken code. It results in
> undefined behaviour if the user enters more than sizeof(name) consecutive
> characters. Use a std::string. Or if you must use arrays, use the getline
> function.

Yes I should add something about geline...good point.
>


> (*) what are your try/catch blocks there for ? And what kind of message is
> "you have had an error" ? division doesn't throw. And why are you catching
> exceptions and printing to the console in a utility function (like dividenum)?

IT is simply raw beginners first intro to try catch blocks...thats it,
nothing more.

>
> (*) why are you using classes and structs without saying what they are ?
>

I just added an intro to classes section...but again I never claimed
this was an all inclusive coverage of all things C++...just useful
tidbits for students.


> You use, but don't define:
>
> member data
> member functions
> public
> private
> constructor

The last three ARE defined in the terms section of the site.

>
> The pointer discussion is a little better, but you could explain that
>
> ptr->member
> is the same as
> (*ptr).member


Good point!

chuckeasttom

unread,
Aug 23, 2002, 8:18:22 AM8/23/02
to
Jack Klein <jack...@spamcop.net> wrote in message news:<3m5bmukooijli0g61...@4ax.com>...


Oh I am so sorry you don't like itoa..however it is widely used and
supported by a boatload of compilers...Now perhaps you learn what
constructive criticism is,,,like several on this board have...or just
keep being a rude asshole...

Neil Butterworth

unread,
Aug 23, 2002, 8:31:42 AM8/23/02
to

"chuckeasttom" <chucke...@yahoo.com> wrote in message
news:46fa0e70.02082...@posting.google.com...

> Donovan Rebbechi <elf...@panix.com> wrote in message
news:<slrnamaknc....@panix2.panix.com>...
> > In article <46fa0e70.02082...@posting.google.com>,
chuckeasttom
> > wrote:
> > > First of all I am greatful for all the input I have received in these
> > > newsgroups. Even those of you that where rude, where still helpful:)
> > >
> > > I am currently teaching programming II with C++ and have a web site
> > > with links, source code, terms, etc. I would like to here any
> > > suggestions or comment you may have regarding:
> > > 1. Content
> > > 2. Errors
> > > 3. Additional Links
> > >
> > > http://www.geocities.com/~chuckeasttom/cclass/
> >

[much snippage here & there]

> > (*) THere's no "Evaluation operator". Should be "equality operator".
>
> I would like a source for that.

Will the ANSI standard do? There is no occurence of the string "evaluation
operator" in the standard - the term "equality operator" first appears in
the table of contents.

> I have, several times, read
> "evalution" and "assignment operator"...

Where?

> > (*) itoa is not ansi C++
> >
>
> but it is pretty darn common and useful. I never claimed to only show
> students stict ansi C++. THe first 1/2 the class is...but after that
> I show them whatever is commonly used.

What makes you think itoa() is commonly used? Does it work with
std::strings?


> > (*) the behaviour of ++x vs x++ has to do with the return values of
those
> > functions, it has nothing to do with the "order" of operations.
> >
> Well thats just not true. If you put the ++ before the x, it operates
> differently than putting it after. That is why they are called prefix
> and postfix operators.

Can you read what he said? Do you understand the meaning of the word
"order"?

> > (*) strcpy should not be used unless you know the destination is large
enough.
> > Use strncpy instead. If you only introduce one function, use the safer
one.
>
> Hmmmm I think your right...I will add that.
> >
> > (*) C-style IO functions should probably be dumped in favor of
std::string
> > anyway
> >
>
> You got me there I still have not shaken all my old C habits..:)

But you've been a "professional C++ programmer" for years!

> > (*) There is no ANSI headercalled iostream.h, and time.h is deprecated.
> > Use <iostream> and <ctime> instead.
> >

Actually, iostream.h is not deprecated, for the simple reasom that it was
never part of the C++ or any other standard.

NeilB


Daniel Frey

unread,
Aug 23, 2002, 8:34:07 AM8/23/02
to
chuckeasttom wrote:
>
> Donovan Rebbechi <elf...@panix.com> wrote in message news:<slrnamaknc....@panix2.panix.com>...
>
> > (*) THere's no "Evaluation operator". Should be "equality operator".
>
> I would like a source for that. I have, several times, read
> "evalution" and "assignment operator"...

Once more: Please buy a copy of the C++ standard, it costs $18 and
defines the language. All other sources (books, postings, etc.) is not
helping, as you will find an example of almost everything you like. If
you don't have the ISO/IEC 14882 C++ standard, you can't teach C++, all
you will teach is some funny dialect of C++ which will not be
compatible. Teaching german can't be done by someone who is german,
lives in german but speaks only bavarian :)

> but it is pretty darn common and useful. I never claimed to only show
> students stict ansi C++. THe first 1/2 the class is...but after that
> I show them whatever is commonly used.

But they have no chance to understand this difference when they just
started to learn C++. They have difference compilers at home or in their
company and all that will work is standard C++, not some #include
<iostream.h> that works for you...

> > (*) the behaviour of ++x vs x++ has to do with the return values of those
> > functions, it has nothing to do with the "order" of operations.
> >
> Well thats just not true. If you put the ++ before the x, it operates
> differently than putting it after. That is why they are called prefix
> and postfix operators.

You haven't understood the point of Donovan. The order of operation is
not affected. It is all described in the C++ standard.

> You got me there I still have not shaken all my old C habits..:)

So please don't teach others your old habbits...

> IT is simply raw beginners first intro to try catch blocks...thats it,
> nothing more.

It's like giving a hand grenade to some 5-year-old kids but don't
telling them about this funny little ring. Either you explain something
(try/catch) completly (or at least sufficiently complete to make it a
useful tool) or you leave it away. Mentioning some buzzwords will not
gain you any expertise, IMHO. If you like, you can put the stuff you
don't explain deep to an appendix to give some preview of comming
attractions in "programming III".

Also, I think your whole page need *FAR MORE* structure.

Regards, Daniel

--
Daniel Frey

aixigo AG - financial training, research and technology
Schloß-Rahe-Straße 15, 52072 Aachen, Germany
fon: +49 (0)241 936737-42, fax: +49 (0)241 936737-99
eMail: danie...@aixigo.de, web: http://www.aixigo.de

John Gilson

unread,
Aug 23, 2002, 8:46:27 AM8/23/02
to
"chuckeasttom" <chucke...@yahoo.com> wrote in message
news:46fa0e70.02082...@posting.google.com...

Chuck, the prefix and postfix increment operators both increment a
variable's
value by one and both have the same precedence and associativity. The one
and only
difference *is* the value they return. When any expression is evaluated in
C/C++,
the order of evaluation of operators is determined solely by the precedence
and
associativity of those operators (unless of course subexpressions are placed
within
parentheses to impose another order, e.g., (2+3)*5). If you look at K&R p.
53
you'll see that the increment operator, whether prefix or postfix, has only
one entry
in the table of operator precedence and associativity. So, when explaining
order
of evaluation of

x = y++;

there are two operators, = and ++, with the increment occuring first because
it
has higher precedence than assignment. The exact same order of evaluation
occurs in
the expression

x = ++y;

The only difference between these two expressions is that in the former the
variable
x is assigned the preincrement value of variable y and in the latter it is
assigned the
postincrement value of variable y.

Hope this helps.

Regards,
jag

Jon Bills

unread,
Aug 23, 2002, 10:14:49 AM8/23/02
to

"chuckeasttom" <chucke...@yahoo.com> wrote in message
news:46fa0e70.02082...@posting.google.com...

> > (*) THere's no "Evaluation operator". Should be "equality operator".


>
> I would like a source for that. I have, several times, read
> "evalution" and "assignment operator"...

Please provide a reference to a passage in the C++ Standard which mentions
"evaluation operator".

> > (*) itoa is not ansi C++
> >
>
> but it is pretty darn common and useful. I never claimed to only show
> students stict ansi C++. THe first 1/2 the class is...but after that
> I show them whatever is commonly used.

There's no excuse for teaching people to learn non-Standard constructs when
there are good Standard alternatives available.

> > (*) the behaviour of ++x vs x++ has to do with the return values of
those
> > functions, it has nothing to do with the "order" of operations.
> >
> Well thats just not true. If you put the ++ before the x, it operates
> differently than putting it after. That is why they are called prefix
> and postfix operators.

Yes, it operates differently, but does not provide any guarantees about
order of evaluation. They are called prefix and postfix because of the
syntax: with "++x", the operator prefixes the operand. Prefix increment
returns the new value following the increment, postfix returns the value
prior to the increment. It does not change when the increment takes place.

> > (*) C-style IO functions should probably be dumped in favor of
std::string
> > anyway
> >
>
> You got me there I still have not shaken all my old C habits..:)

Shouldn't you do that *before* deciding that you should teach "C++"?

> > (*) There is no ANSI headercalled iostream.h, and time.h is deprecated.
> > Use <iostream> and <ctime> instead.
> >
>
> Again my old C habits cropping up... I love that .h...

There is no Standard C header called "iostream.h" either.


chuckeasttom

unread,
Aug 23, 2002, 11:28:07 AM8/23/02
to
"Randy Birch" <r...@mvps.org> wrote in message news:<Ltc99.66907$8aG1....@news01.bloor.is.net.cable.rogers.com>...

> But otherwise its great, right <g>.
>
> --
>
> Randy Birch
> MVP Visual Basic
> http://www.mvps.org/vbnet/
> Please respond only to the newsgroups so all can benefit.
>
>
<snip>

> | (*) THere's no "Evaluation operator". Should be "equality operator".
> |
> | (*) You don't define what a "definition" or an "expression" is.
> |
> | (*) The explanation of for loops and conditional branching is inadequate.
> | For example, you don't say what the else does, and don't explain that it's
> | optional.
> |
> | (*) itoa is not ansi C++
> |
Change made to reflect this on site..thanks


> | (*) the behaviour of ++x vs x++ has to do with the return values of those
> | functions, it has nothing to do with the "order" of operations.

If you are claiming that where you put the ++ does not effect when the
operation takes place,then you are incorrect.

> |
> | (*) strcpy should not be used unless you know the destination is large
> enough.
> | Use strncpy instead. If you only introduce one function, use the safer
> one.


Good suggestion, I added strncpy.


> |
> | (*) C-style IO functions should probably be dumped in favor of std::string
> | anyway
> |

Done..

> | (*) Exception handling is more complicated than this (-;
> |

Again this is not a comprehensive c++ text...its just a few tips..

> | (*) why do you have two lousy explanations of if/then/else and for ? One
> | good explanation would be better.
> |

And you feel a good explanation would be??

> | (*) There is no ANSI headercalled iostream.h, and time.h is deprecated.
> | Use <iostream> and <ctime> instead.

iostream fixed..I will get to ctime when I have time :)

> |
> | (*) You need to handle namespace issues when you do that.

I will have to get to that later...but again this is NOT a
comprehesive text..just a site with tips.


> |
> | (*) cin >> name where name is a character array is broken code. It results
> in
> | undefined behaviour if the user enters more than sizeof(name) consecutive
> | characters. Use a std::string. Or if you must use arrays, use the getline
> | function.
> |

I will be adding soon. good suggestion though...

> | (*) what are your try/catch blocks there for ? And what kind of message
> is
> | "you have had an error" ? division doesn't throw. And why are you catching
> | exceptions and printing to the console in a utility function (like
> dividenum)?

To give a raw beginner some idea what a try catch block is... Again
this is NOT a text..just a few hints.


> |
> | (*) why are you using classes and structs without saying what they are ?
> |
> | You use, but don't define:
> |
> | member data
> | member functions
> | public
> | private
> | constructor
> |

Defined in the terms section

> | The pointer discussion is a little better, but you could explain that
> |
> | ptr->member
> | is the same as
> | (*ptr).member
> |

Good suggestion I will try to add it today.

> | --
> | Donovan

Donovan Rebbechi

unread,
Aug 23, 2002, 11:31:18 AM8/23/02
to
In article <3d662a6f$1...@mk-nntp-1.news.uk.worldonline.com>, Neil Butterworth
wrote:

>
>> > (*) There is no ANSI headercalled iostream.h, and time.h is deprecated.
>> > Use <iostream> and <ctime> instead.
>> >
>
> Actually, iostream.h is not deprecated, for the simple reasom that it was
> never part of the C++ or any other standard.

Yes, but I didn't say it was.

Cheers,
--
Donovan

Neil Butterworth

unread,
Aug 23, 2002, 11:42:53 AM8/23/02
to

"Donovan Rebbechi" <elf...@panix.com> wrote in message
news:slrnamcla6....@panix2.panix.com...

Sorry, I misread.

NeilB


Donovan Rebbechi

unread,
Aug 23, 2002, 11:54:10 AM8/23/02
to
In article <46fa0e70.02082...@posting.google.com>, chuckeasttom
wrote:

>> (*) THere's no "Evaluation operator". Should be "equality operator".


>
> I would like a source for that. I have, several times, read
> "evalution" and "assignment operator"...

International Standard ISO/IEC 14882 First Edition 1998-09-01
Programming languages -- C++

Section 5.10: "Equality operators"

Don't guess! The standard is the authoritative source.

>> (*) You don't define what a "definition" or an "expression" is.
>
> Hmmm good point. ON the 'terms' section, however expression is
> defined...but alas definition is not...

For the purpose of a tutorial, it's not really sufficient to just put
something in a glossary at the end. The terminology needs to be presented
as the tutorial progresses.

>> (*) itoa is not ansi C++
>
> but it is pretty darn common and useful. I never claimed to only show

No it isn't.

There are better ways to do the same thing, using standard language features.

For example, you can do this sort of thing using stringstreams.

> students stict ansi C++.

But why show them nonstandard extensions where the same can be done in a way
that is safer, using standard language features ?

> THe first 1/2 the class is...but after that I show them whatever is commonly
> used.

I don't "commonly use" itoa. Neither do a lot of other posters here.

You can be pretty sure that the C++ language is "commonly used"-- everyone
who reads this forum uses it! On the other hand, there is no set of vendor
extensions that *everyone* uses. Most people here use at least one set of
vendor extensions, but not necessarily the same one.

> Well thats just not true. If you put the ++ before the x, it operates
> differently than putting it after. That is why they are called prefix
> and postfix operators.

The return value is different, but the precedence is not.

IMO, the biggest obstruction to you presenting a good tutorial is your lack
of knowledge. Your writing style is OK, but there are a lot of errors, and other
things that are not errors, but just poor coding style.

Some suggestions--

(*) get "Accelerated C++" and read it from start to finish. Don't be too proud
to read something commonly recommended as a "beginners book" -- this book
has something to offer to experienced programmers as well. I got a lot out of
it, I'm sure you will too.

(*) get the standard. It's only $18-

>> (*) why do you have two lousy explanations of if/then/else and for ? One
>

> Suggestions.

It's too short. For example, you don't explain why the else is there, and
you don't explain that you don't need the else. You also don't explain that
you can use "else if" to chain together multiple conditions.

>> (*) There is no ANSI headercalled iostream.h, and time.h is deprecated.
>> Use <iostream> and <ctime> instead.
>>
>
> Again my old C habits cropping up... I love that .h...
>
>> (*) You need to handle namespace issues when you do that.
>
> Correct. However I never claimed the page was a textbook covering
> every aspect of C++. Just a few of the more common little tid bits...

You can't write a "correct" hello world program, without doing something with
namespaces. Therefore, namespaces are pretty fundamental.

You don't need to go into them in depth, but you need
using namespace std;
at the front of a program for the standard names to work without explicitly
qualifying namespaces.



> IT is simply raw beginners first intro to try catch blocks...thats it,
> nothing more.

IMO you could omit the section on exception handling.

If you can't find any decent motivating examples, it's a sign that you don't
really need to cover it.

If you do want to cover it, you should cover "throw" as well.

One gool example would be a function that tries to open a file, and throws
if it fails.

>> You use, but don't define:
>>
>> member data
>> member functions
>> public
>> private
>> constructor
>
> The last three ARE defined in the terms section of the site.

I recommend copy/pasting the terms into the section where they appear. It
makes it easier for beginners to follow.

Cheers,
--
Donovan

Richard Heathfield

unread,
Aug 23, 2002, 11:52:27 AM8/23/02
to
chuckeasttom wrote:
>
> Jack Klein <jack...@spamcop.net> wrote in message news:<3m5bmukooijli0g61...@4ax.com>...
> > On 22 Aug 2002 08:20:13 -0700, chucke...@yahoo.com (chuckeasttom)
> > wrote in comp.lang.c++:
> >
<snip>

> >
> > The C++ section is littered with errors, and poor formatting to boot.
> > Did you actually view this in an HTML browser? Putting different
> > number of ordinary space characters between a <P> tag and the first
> > printable character does not produce varying indents in HTML.
> >
> > The very first item in the code.htm frame is wrong. There is no
> > "itoa" function in ANSI C++.
> >
> > First learn a little bit about HTML and how to put together an
> > intelligible web page. Then learn the subject matter you want to put
> > on your page before you actually put it their and expose it to the
> > public.
>
> Oh I am so sorry you don't like itoa..

Jack didn't *say* he doesn't like itoa. He said there is no such
function in ANSI C++, and he is correct in saying that.

> however it is widely used and
> supported by a boatload of compilers...

What has that to do with anything? He said it's not an ANSI C++
function, and it isn't.

> Now perhaps you learn what
> constructive criticism is

You have made it abundantly clear that anyone who offers you
constructive criticism is an "asshole", so why should anyone bother to
help you in future?

> ,,,like several on this board have...or just
> keep being a rude asshole...

Ah, there you go again, winning friends and influencing people. Get a
clue, please. And you say you *teach*??? Heaven help your students. Do
you call them "assholes" when they correct your misconceptions about
C++?

Default User

unread,
Aug 23, 2002, 1:46:36 PM8/23/02
to
Jack Klein wrote:

> First learn a little bit about HTML and how to put together an
> intelligible web page. Then learn the subject matter you want to put
> on your page before you actually put it their and expose it to the
> public.

The brusque but knowledgable folk on alt.html could probably help with
his markup problems. However, based on his reaction to the rather mild
criticism here, I think that he'd quickly be in a state of war with
them.

They tolerate fools even less so than comp.lang.c++.

Brian Rodenborn

John Harrison

unread,
Aug 23, 2002, 2:05:03 PM8/23/02
to
>
> > | (*) the behaviour of ++x vs x++ has to do with the return values of
those
> > | functions, it has nothing to do with the "order" of operations.
>
> If you are claiming that where you put the ++ does not effect when the
> operation takes place,then you are incorrect.
>

You aren't the only person to misunderstand this.

Think about it like this

int& plus_before(int& x)
{
x = x + 1;
return x;
}

int plus_after(int& x)
{
int old_x = x;
x = x + 1;
return old_x;
}

int x = 1;
cout << plus_before(x);
cout << plus_after(x);

plus_before(x) is like ++x;
plus_after(x) is like x++;

In BOTH cases the plus happens before the cout << happens. But the two
functions return different values. It exactly the same with ++, no matter
what your books, or websites or other people say.

john

chuckeasttom

unread,
Aug 23, 2002, 4:57:13 PM8/23/02
to
Richard Heathfield <bin...@eton.powernet.co.uk> wrote in message news:<3D65ED90...@eton.powernet.co.uk>...

How about this...go bugger your mother you pompous and condescending bastard...

John Harrison

unread,
Aug 23, 2002, 5:11:36 PM8/23/02
to
> >
> I believe that you are simply wrong on this one. And so do few other
> people:
> http://www.geocities.com/sstutor/operators.htm
> http://cpptips.hyperformix.com/cpptips/inc
> As well as about a half dozen C++ books on my shelf
> Placeing the operator prior to the variable in question makes it a
> prefix operator and the operation will occur first. Placing it after
> makes in a postfix operator and it happens after the other operations.
>

The first web site is wrong, the second doesn't say what you think it does.
As for your books they are either wrong, or they don't say what you think
they say. Despite everyone saying that you are wrong you don't seem to have
shown the slightest interest in why you are wrong, or what the correct
description of the prefix and postfix increment operators is.

john

Stephen Smith

unread,
Aug 23, 2002, 5:24:42 PM8/23/02
to
John Harrison wrote in message:

> > If you are claiming that where you put the ++ does not effect when the
> > operation takes place,then you are incorrect.
> >
>
> You aren't the only person to misunderstand this.
>
> Think about it like this
>
> int& plus_before(int& x)
> {
> x = x + 1;
> return x;
> }
>
> int plus_after(int& x)
> {
> int old_x = x;
> x = x + 1;
> return old_x;
> }
>
> int x = 1;
> cout << plus_before(x);
> cout << plus_after(x);
>
> plus_before(x) is like ++x;
> plus_after(x) is like x++;
>
> In BOTH cases the plus happens before the cout << happens. But the two
> functions return different values. It exactly the same with ++, no matter
> what your books, or websites or other people say.
>
> john

IMHO you raise a good point by demonstrating the ++ operator behaviour in
this manner. Maybe the original poster would consider including such little
code snippets or maybe even simple diagrams to get things across to people.
In the 2-3 books I have on C/C++ they all have diagrams outlining things,
especially Pointers.

Besides, as the original poster said, quote: "WARNING- Yes I like cute litte


JavaScripts and animated gifs on my pages. If you don't, then the layout

may not be appealing to you" then maybe including diagrams will make certain
aspects easier to grasp and quite literally, "visualise".

A picture can speak a 1000 words.

Stephen.


Richard Heathfield

unread,
Aug 23, 2002, 5:50:36 PM8/23/02
to
chuckeasttom wrote:
>
> Richard Heathfield <bin...@eton.powernet.co.uk> wrote in message news:<3D65ED90...@eton.powernet.co.uk>...
> > >
<about 140 lines snipped>

> >
> > Now please, either apologise to Ron for insulting him, or crawl back
> > into your cess-pit and shut up about C++ forever. I don't care which.
>
> How about this...go bugger your mother you pompous and condescending bastard...

I freely admit my knowledge of the American language is somewhat sparse,
but this doesn't look to me like an apology.

Default User

unread,
Aug 23, 2002, 5:51:27 PM8/23/02
to
chuckeasttom wrote:

> How about this...go bugger your mother you pompous and condescending bastard...

And the winnah in the How To Make Friends and Influence People contest
is . . . .

Not this guy. What a maroon.


Brian Rodenborn

Neil Butterworth

unread,
Aug 23, 2002, 6:21:29 PM8/23/02
to

"Default User" <first...@company.com> wrote in message
news:3D66AE5F...@company.com...

This is an insult to fireworks everywhere!

NeilB


Magnus Lidbom

unread,
Aug 23, 2002, 7:36:08 PM8/23/02
to
I don't expect you to give up your job as some people have inferred that you should, who would?
I do however feel, that an intelligent person will realise, that the fact that not one single person has agreed with you,
about any single language feature, must mean something.
After all, most people on this newsgroup are quite proficient at C++.
( I mean comp.lang-c++ . I just noticed this is posted to three newsgroups. )

>>"I have written professional C++ code for years"

This is , sadly, not that unusual a misinterpretation. The fact that you have been paid to write or teach C++ does not mean that
you are a pro. C++ is not like riding a bike. You don't just get on and try and try again, until you "get it".

Someone suggested reading a C++ book and I agree completely. I feel you owe it to yourself and even more to your students.
Get yourself a good beginners book to start with and then get "The C++ Programming Language".
Reading those books will help. Asking for help politely and accepting critique will help.
Calling people names will definitely not help.

/Magnus


"chuckeasttom" <chucke...@yahoo.com> wrote in message
news:46fa0e70.02082...@posting.google.com...

chuckeasttom

unread,
Aug 23, 2002, 9:48:19 PM8/23/02
to
"Neil Butterworth" <neil_but...@lineone.net> wrote in message news:<3d662a6f$1...@mk-nntp-1.news.uk.worldonline.com>...

> "chuckeasttom" <chucke...@yahoo.com> wrote in message
> news:46fa0e70.02082...@posting.google.com...
> > Donovan Rebbechi <elf...@panix.com> wrote in message
> news:<slrnamaknc....@panix2.panix.com>...
> > > In article <46fa0e70.02082...@posting.google.com>,
> chuckeasttom
> > > wrote:
> > > > First of all I am greatful for all the input I have received in these
> > > > newsgroups. Even those of you that where rude, where still helpful:)
> > > >
> > > > I am currently teaching programming II with C++ and have a web site
> > > > with links, source code, terms, etc. I would like to here any
> > > > suggestions or comment you may have regarding:
> > > > 1. Content
> > > > 2. Errors
> > > > 3. Additional Links
> > > >
> > > > http://www.geocities.com/~chuckeasttom/cclass/
> > >
>
> [much snippage here & there]
>
> > > (*) THere's no "Evaluation operator". Should be "equality operator".
> >
> > I would like a source for that.
>
> Will the ANSI standard do? There is no occurence of the string "evaluation
> operator" in the standard - the term "equality operator" first appears in
> the table of contents.
>
What is wrong with you people? The term 'evaluation operator' is just
a description. The idea is that it evaluates whether or not the two
items are equal... You act like every answer must be a verbatim quote
from the HOLY ISO STANDARDS...get a grip?

> > > (*) itoa is not ansi C++
> > >
> >
> > but it is pretty darn common and useful. I never claimed to only show
> > students stict ansi C++. THe first 1/2 the class is...but after that
> > I show them whatever is commonly used.
>
> What makes you think itoa() is commonly used? Does it work with
> std::strings?

Because I freaking have seen it in truck loads of code, dozens of
books, and dozens of web sites. At the end of the day most people in
the real world use what works for them in their current situation...


>
>
> > > (*) the behaviour of ++x vs x++ has to do with the return values of
> those
> > > functions, it has nothing to do with the "order" of operations.
> > >
> > Well thats just not true. If you put the ++ before the x, it operates
> > differently than putting it after. That is why they are called prefix
> > and postfix operators.
>
> Can you read what he said? Do you understand the meaning of the word
> "order"?
>

Yes..and it still comes out the same. You can nitpick on
terminology...I guess you have no life to get back to, but the bottom
line in the real world is this: If I put the ++ operator after a
variable with an assignment operator, the assignment will take place
first. For example

int x,y;
x = 7;
y = x++;
cout y;

Guess what folks...y will print out as 7 NOT AS 8... you all know
that and agree with it. Rather than move on you wish to argue
incessently over nothing..

> > You got me there I still have not shaken all my old C habits..:)
>
> But you've been a "professional C++ programmer" for years!

Kiss my ass...


>
> > > (*) There is no ANSI headercalled iostream.h, and time.h is deprecated.
> > > Use <iostream> and <ctime> instead.
> > >
>
> Actually, iostream.h is not deprecated, for the simple reasom that it was
> never part of the C++ or any other standard.
>

GET A FREAKING GRIP!!!!!! YOU CAN USE IT IN SEVERAL COMPILERS AND IT
FREAKING WORKS.. SOME OF US ACTUALLY TRY TO WRITE WORKING CODE..NOT
ARGUE OVER BULLSHIT ALL DAY.
> NeilB

chuckeasttom

unread,
Aug 23, 2002, 9:51:31 PM8/23/02
to
"Jon Bills" <jon_...@hotmail.com> wrote in message news:<ak5g39$bq...@cvis05.marconicomms.com>...

> "chuckeasttom" <chucke...@yahoo.com> wrote in message
> news:46fa0e70.02082...@posting.google.com...
>
> > > (*) THere's no "Evaluation operator". Should be "equality operator".
> >
> > I would like a source for that. I have, several times, read
> > "evalution" and "assignment operator"...
>
> Please provide a reference to a passage in the C++ Standard which mentions
> "evaluation operator".

AGain to all of you it is a term, a description. The operator indeed
evaluates whether or not the two items are equal. The C++ standard is
not the holy word of God. It is possible to actually phrase things
slightly differently and still have essentially the same meaning.

>
> > > (*) itoa is not ansi C++
> > >
> >
> > but it is pretty darn common and useful. I never claimed to only show
> > students stict ansi C++. THe first 1/2 the class is...but after that
> > I show them whatever is commonly used.
>
> There's no excuse for teaching people to learn non-Standard constructs when
> there are good Standard alternatives available.

Sure there is... because in the real world they will see itoa a lot.
Real programmers simply try to create solutions...even if some
techniques are not spelled out specifically in the ISO standards..

Magnus Lidbom

unread,
Aug 23, 2002, 10:14:56 PM8/23/02
to
Those following this thread (with horrified fascination) may be interested to know it seems to have made a bit of a jump to:
GET A GRIP was:Re: Please give me your input on my sites change.
/Magnus

"Richard Heathfield" <bin...@eton.powernet.co.uk> wrote in message news:3D665A3B...@eton.powernet.co.uk...

Ioannis Vranos

unread,
Aug 23, 2002, 10:49:07 PM8/23/02
to
"chuckeasttom" <chucke...@yahoo.com> wrote in message
news:46fa0e70.02082...@posting.google.com...
> First of all I am greatful for all the input I have received in
these
> newsgroups. Even those of you that where rude, where still
helpful:)
>
> I am currently teaching programming II with C++ and have a web site
> with links, source code, terms, etc. I would like to here any
> suggestions or comment you may have regarding:
> 1. Content
> 2. Errors
> 3. Additional Links
>
> http://www.geocities.com/~chuckeasttom/cclass/

1) In the main page remove:

"C++ is a challange that tests what you are made of as a programmer...
If your not up to the challange it will eat you alive!"

and replace it with:

"VB is not really for programming. VB is only suitable for drawing
interfaces. C++ on the other hand is a real programming language".
Also the dog is not needed.


2) Do not mix ANSI C++ code & concepts with Visual C++ extensions.


3) Learn C++ (i am learning too). Since you know the basics, i suggest
"The C++ Programming Language" 3rd Edition or Special Edition by
Bjarne Stroustrup (the creator of C++). The reading will take a
couple+ years, but this is what it takes for people to become better
programmers.


>
> Also, after a lot of helpful suggestions, I have just finished
> drastically altering my Visual Basic encryption page, and would like
> to hear your opinions.
> I have changed the content, added links, and added appropriate
caveas.
> http://www.geocities.com/~chuckeasttom/vb/Vb.htm


I do not think that VB-specific content is useful. A better
system-level but wide approach would be .NET and perhaps there you can
use VB.


--
Ioannis

* Ioannis Vranos
* Programming pages: http://www.noicys.cjb.net
* Alternative URL: http://run.to/noicys

|{evin

unread,
Aug 23, 2002, 10:53:17 PM8/23/02
to
chuckeasttom wrote:
> What is wrong with you people? The term 'evaluation
> operator' is just a description. The idea is that it
> evaluates whether or not the two items are equal... You
> act like every answer must be a verbatim quote from the
> HOLY ISO STANDARDS...get a grip?


Yeah... and 'clear liquid' is just a description. Would you feel safe
drinking a solution of clear liquid without a better description?
Well... I guess I see your point, after all what's the difference
between Water and Hydrogen Peroxide... other than the extra oxygen?
Standards exist for a reason... 'close enough' doesn't cut it.

> Because I freaking have seen it in truck loads of code,
> dozens of books, and dozens of web sites. At the end of
> the day most people in the real world use what works for
> them in their current situation...


Anyone can slap up some code, or throw up a website (as you have
done)... Hell, people have published books that had no business doing
so. That doesn't make it right.

> Yes..and it still comes out the same. You can nitpick on
> terminology...I guess you have no life to get back to,
> but the bottom line in the real world is this: If I put
> the ++ operator after a variable with an assignment
> operator, the assignment will take place first. For
> example
>
> int x,y;
> x = 7;
> y = x++;
> cout y;
>
> Guess what folks...y will print out as 7 NOT AS 8... you
> all know that and agree with it. Rather than move on you
> wish to argue incessently over nothing..
>


Hmm... wonder what 'y = ++x;' would do.. It's not that programmers
have no life... we just like doing it right the first time. Employers
like that.

> Kiss my ass...

I'm beginning to doubt your claim of being an instructor. Every
instructor I've ever had understands the importance of standards, and
the idea that just because something happens to work in a given
situation doesn't mean that it's the correct solution.

>
> GET A FREAKING GRIP!!!!!! YOU CAN USE IT IN SEVERAL
> COMPILERS AND IT FREAKING WORKS.. SOME OF US ACTUALLY TRY
> TO WRITE WORKING CODE..NOT ARGUE OVER BULLSHIT ALL DAY.


'Several', so... if I learn to code from you, then I'm constrained to
use just those compilers on specific platforms. Why not learn the
standard and do it right? When I do that, I won't have to worry about
what compiler, OS, or environment I'm working in. Well, not very much
anyway. :)

btw, using all caps is considered shouting, and rude.. please see
about getting that keyboard fixed, mmkay?

--
Kevin
My kids seem to always be around, remove them to reply
directly to me.

|{evin

unread,
Aug 23, 2002, 10:59:07 PM8/23/02
to
chuckeasttom wrote:
> Jack Klein <jack...@spamcop.net> wrote
>>
>> The C++ section is littered with errors, and poor
>> formatting to boot. Did you actually view this in an
>> HTML browser? Putting different number of ordinary
>> space characters between a <P> tag and the first
>> printable character does not produce varying indents in
>> HTML.
>>
>> The very first item in the code.htm frame is wrong.
>> There is no "itoa" function in ANSI C++.
>>
>> First learn a little bit about HTML and how to put
>> together an intelligible web page. Then learn the
>> subject matter you want to put on your page before you
>> actually put it their and expose it to the public.
>
> Oh I am so sorry you don't like itoa..however it is
> widely used and supported by a boatload of
> compilers...Now perhaps you learn what constructive
> criticism is,,,like several on this board have...or just
> keep being a rude asshole...


Again... how widely? I've never used it. I also wanted to point
something else out... What 'board' are you referring to? Is this
another one of your "it's just a description" things? Oh wait...
you're using google's web interface. Ah. You do realize that you're
actually posting to usenet, right? Your 'board' is just a cheesy web
interface.

John Harrison

unread,
Aug 24, 2002, 12:48:20 AM8/24/02
to
> >
> Yes..and it still comes out the same. You can nitpick on
> terminology...I guess you have no life to get back to, but the bottom
> line in the real world is this: If I put the ++ operator after a
> variable with an assignment operator, the assignment will take place
> first. For example
>
> int x,y;
> x = 7;
> y = x++;
> cout y;
>
> Guess what folks...y will print out as 7 NOT AS 8... you all know
> that and agree with it. Rather than move on you wish to argue
> incessently over nothing..

You are still wrong. y will print out as 7, but still the increment happens
first. Go figure, its been explained enough times already.

Why are you asking for advice when you aren't prepared to listen? You've
taken a lot of abuse, which I don't think you deserved but you aren't
helping yourself by not listening.

john

John Harrison

unread,
Aug 24, 2002, 12:50:46 AM8/24/02
to

"chuckeasttom" <chucke...@yahoo.com> wrote in message
news:46fa0e70.0208...@posting.google.com...

> "Jon Bills" <jon_...@hotmail.com> wrote in message
news:<ak5g39$bq...@cvis05.marconicomms.com>...
> > "chuckeasttom" <chucke...@yahoo.com> wrote in message
> > news:46fa0e70.02082...@posting.google.com...
> >
> > > > (*) THere's no "Evaluation operator". Should be "equality operator".
> > >
> > > I would like a source for that. I have, several times, read
> > > "evalution" and "assignment operator"...
> >
> > Please provide a reference to a passage in the C++ Standard which
mentions
> > "evaluation operator".
>
> AGain to all of you it is a term, a description. The operator indeed
> evaluates whether or not the two items are equal. The C++ standard is
> not the holy word of God. It is possible to actually phrase things
> slightly differently and still have essentially the same meaning.
>

Evaluate is a poor term, since practically every operator in C++ evaluates
something.

> >
> > > > (*) itoa is not ansi C++
> > > >
> > >
> > > but it is pretty darn common and useful. I never claimed to only show
> > > students stict ansi C++. THe first 1/2 the class is...but after that
> > > I show them whatever is commonly used.
> >
> > There's no excuse for teaching people to learn non-Standard constructs
when
> > there are good Standard alternatives available.
>
> Sure there is... because in the real world they will see itoa a lot.
> Real programmers simply try to create solutions...even if some
> techniques are not spelled out specifically in the ISO standards..

Your reasoning is fair enough, but you did put itoa in a section which said
ANSI C++.

john

Donovan Rebbechi

unread,
Aug 24, 2002, 1:49:50 AM8/24/02
to
In article <46fa0e70.0208...@posting.google.com>, chuckeasttom wrote:

>> Please provide a reference to a passage in the C++ Standard which mentions
>> "evaluation operator".
>
> AGain to all of you it is a term, a description.

But not a very good one. What would one expect an "evaluation operator" to do ?

> The operator indeed
> evaluates whether or not the two items are equal.

Why wouldn't it evaluate the sum of the operands instead ?

> It is possible to actually phrase things slightly differently and still have
> essentially the same meaning.

I *almost* agree with you on this point. If you chose a different but equally
clear term, it would be fine. For example, you used the term
"in-place addition" operator and you used "additive assignment" to describe
+=, that would be OK, because the terminology is still clear. The real problem
is that your terminology is as unclear as it is idiosyncratic.

>> There's no excuse for teaching people to learn non-Standard constructs when
>> there are good Standard alternatives available.
>
> Sure there is... because in the real world they will see itoa a lot.

I don't see itoa at all, and I'd have anyone who used it taken out and shot
(partly because the compiler we use does not support it)

> Real programmers simply try to create solutions...even if some
> techniques are not spelled out specifically in the ISO standards..

Right. All C++ programmers use C++. All C++ programmers use some nonstandard
vendor extensions. The problem is that not everyone uses the same set of vendor
extensions, and not all compilers support the same extensions. Unless you force
all your students to go to the same vendor, not all of your students will
compile on systems with the same vendor extensions.

A maxim worthy of consideration is that it's better to prefer, all things being
equal, standard functions to non-standard functions. Obviously, there are
casses where there is no standard function and you have to use vendor supplied
functions (GUI, network/console/filesystem I/O, 3d graphics, ... )

--
Donovan

Anthony Ventimiglia

unread,
Aug 24, 2002, 1:55:40 AM8/24/02
to
On 23 Aug 2002 13:57:13 -0700, chuckeasttom
<chucke...@yahoo.com> wrote:
> How about this...go bugger your mother you pompous and condescending bastard...

I sure hope you're teaching 6 year olds, because I'd hate to see what
happens when your students start to prove you wrong.

Donovan Rebbechi

unread,
Aug 24, 2002, 2:44:27 AM8/24/02
to
In article <46fa0e70.02082...@posting.google.com>, chuckeasttom
wrote:

> What is wrong with you people? The term 'evaluation operator' is just


> a description. The idea is that it evaluates whether or not the two
> items are equal...

The problem is that it's a poor description (the additive/multiplicative
operators also "evaluate" operators. There are even other boolean "evaluation"
operators, like <,>,<=,>=,!=,||,&&)

> You act like every answer must be a verbatim quote
> from the HOLY ISO STANDARDS...get a grip?

Idiosyncratic terminology is OK as long as it is clear.

>> What makes you think itoa() is commonly used? Does it work with
>> std::strings?
>
> Because I freaking have seen it in truck loads of code, dozens of
> books, and dozens of web sites.

I addressed this in other posts. There are a lot of good reasons to dump itoa
and use standard string functions.

> At the end of the day most people in the real world use what works for them
> in their current situation...

Different things work for different people.

C++ works for all C++ programmers.

Specific vendor extensions work for customers of that vendor.

Therefore, standard C++ functions have broader utility than functions with
equivalent or inferior functionality supplied by vendor extensions.

In this particular example, itoa is a hangover from the days before C++ and
stringstreams (and perhaps even from the wild-west days of pre-standard C)

>> Can you read what he said? Do you understand the meaning of the word
>> "order"?
>>
> Yes..and it still comes out the same. You can nitpick on
> terminology...I guess you have no life to get back to, but the bottom
> line in the real world is this: If I put the ++ operator after a
> variable with an assignment operator, the assignment will take place
> first.

The ++ operator has higher precedence (read the operator precedence chart in
your textbook and verify this for yourself). The return value of the operator
is the same as the value prior to applying that operator. It has nothing to
do with precedence.

Your example only shows that there are examples that do not expose the
erroneousness of your explanation.

Here is an example that gives output inconsistent with your explanation,
and shows that ++ does have higher precedence


#include <iostream>

struct X
{
X operator++(int) {
std::cout << "Got here(1)" << std::endl;
return *this;
}

X& operator= (const X&) {
std::cout << "Got here(2)" << std::endl;
return *this;
}
};

int main()
{
X x,y;
y = x++;
}

/*
Output (as you can see, the assignment took place after the increment):

Got here(1)
Got here(2)
*/

>> Actually, iostream.h is not deprecated, for the simple reasom that it was
>> never part of the C++ or any other standard.
>>
>
> GET A FREAKING GRIP!!!!!! YOU CAN USE IT IN SEVERAL COMPILERS AND IT
> FREAKING WORKS.. SOME OF US ACTUALLY TRY TO WRITE WORKING CODE..NOT
> ARGUE OVER BULLSHIT ALL DAY.

Yes, but why does it work ? Will it work on those compilers a year from now ?
gcc already issues warnings for use of deprecated functions! Why did the
standards committee decide to use different headers ? What are the possible
advantages of using these ? Try to educate yourself about these questions.
Don't just write about C++: read about it as well. A true scholar reads and
writes, but usually reads a higher volume than they write. And again, I
recommend "Accelerated C++". It will get you up to speed on the newer language
features.

Cheers,
--
Donovan

chuckeasttom

unread,
Aug 24, 2002, 8:42:51 AM8/24/02
to
"Ioannis Vranos" <noi...@spammers.get.lost.hotmail.com> wrote in message news:<10301573...@athprx02.forthnet.gr>...

> "chuckeasttom" <chucke...@yahoo.com> wrote in message
> news:46fa0e70.02082...@posting.google.com...
> > First of all I am greatful for all the input I have received in
> these
> > newsgroups. Even those of you that where rude, where still
> helpful:)
> >
> > I am currently teaching programming II with C++ and have a web site
> > with links, source code, terms, etc. I would like to here any
> > suggestions or comment you may have regarding:
> > 1. Content
> > 2. Errors
> > 3. Additional Links
> >
> > http://www.geocities.com/~chuckeasttom/cclass/
>
> 1) In the main page remove:
>
> "C++ is a challange that tests what you are made of as a programmer...
> If your not up to the challange it will eat you alive!"
>
> and replace it with:
>
> "VB is not really for programming. VB is only suitable for drawing
> interfaces. C++ on the other hand is a real programming language".
> Also the dog is not needed.
>
>
> 2) Do not mix ANSI C++ code & concepts with Visual C++ extensions.

Ahhh yes the old anything from Microsoft is evil bs...If VB ios not
really for programming and only suitable for drawing interfaces, then
the thousands of professional programmers using itwill really be
suprised. As will the many businesses using VB or VC++....

Are you even aware of the things you CAN do in VB? TCP socekts
programming, Database programming, any agorithm you can implement in C
or C++ can also be done in VB, etc. etc.

Richard Heathfield

unread,
Aug 24, 2002, 6:11:41 AM8/24/02
to
Ioannis Vranos wrote:
>
> "chuckeasttom" <chucke...@yahoo.com> wrote in message
> news:46fa0e70.02082...@posting.google.com...

<snip>

> > http://www.geocities.com/~chuckeasttom/cclass/
>
> 1) In the main page remove:
>
> "C++ is a challange that tests what you are made of as a programmer...
> If your not up to the challange it will eat you alive!"
>
> and replace it with:
>
> "VB is not really for programming. VB is only suitable for drawing
> interfaces. C++ on the other hand is a real programming language".

Ioannis, that's a ludicrous claim. VB is a perfectly reasonable
programming language, for those who like that kind of thing. It may not
be your cup of tea, but that's more or less irrelevant. People think
about programming in *different* ways, and that's why there are
different languages. Who are you to say that someone who thinks in a VB
way should be excluded from programming?

> Also the dog is not needed.

Purely a matter of taste, and hardly a relevant criticism, when there
are so many more important points to make.

> 2) Do not mix ANSI C++ code & concepts with Visual C++ extensions.

Not when explaining the language, anyway. Of course, there are times
when we *need* platform-specific extensions, but we ought at least to
know when we are using them and why.

> 3) Learn C++ (i am learning too). Since you know the basics, i suggest
> "The C++ Programming Language" 3rd Edition or Special Edition by
> Bjarne Stroustrup (the creator of C++). The reading will take a
> couple+ years, but this is what it takes for people to become better
> programmers.

This is sound advice.

> > Also, after a lot of helpful suggestions, I have just finished
> > drastically altering my Visual Basic encryption page, and would like
> > to hear your opinions.
> > I have changed the content, added links, and added appropriate
> caveas.
> > http://www.geocities.com/~chuckeasttom/vb/Vb.htm
>
> I do not think that VB-specific content is useful.

Well, you wouldn't, would you? But some VB programmers might consider
VB-specific content useful.


> A better
> system-level but wide approach would be .NET and perhaps there you can
> use VB.

How noble of you to allow that generous concession. Look, if the guy
wants a VB Web page, why *shouldn't* he have one? The world is not
defined by your prejudices.

Phlip

unread,
Aug 24, 2002, 1:21:40 PM8/24/02
to
"chuckeasttom" wrote:

> > "VB is not really for programming. VB is only suitable for drawing
> > interfaces. C++ on the other hand is a real programming language".
> > Also the dog is not needed.
> >
> > 2) Do not mix ANSI C++ code & concepts with Visual C++ extensions.
>
> Ahhh yes the old anything from Microsoft is evil bs...If VB ios not
> really for programming and only suitable for drawing interfaces, then
> the thousands of professional programmers using itwill really be
> suprised. As will the many businesses using VB or VC++....

Here's my post this morning to the news:comp.object thread "analysis+design
methodology":

----8<--------------------------

Willard Thompson wrote:

> With regard to analysis I would look into requirements analysis output
> artifacts or input design artifacts. Such things consist of use
> cases, use case diagrams, requirements specification documents. In
> the OO environment, boundary classes need to be identified. UML can
> be used as well with regard to some class diagrams and sequence
> diagrams, etc. Among others are OMT, SOMA, Coad-Yourdon, etc.
> Remember analysis is defining the system from the user's perspective,
> usually and design is defining the internal structure of the system.
> Ultimately, every what, when and how should be answered.

There are those who suspect that the VB culture promotes "write and forget
code", meaning as one progresses thru the feature list one forgets previous
coding activities and re-invents fresh and redundant code to back up new
screens, instead of forcing a higher level of reuse. The next level is
"write only code", where instead of reinventing one simply copies and
pastes.

The above list of requirements analysis techniques, and design techniques,
may be the next level up, but in many peoples' experience they promote a
new kind of risk. If the requirements lead to a certain structure of
windows and controls and database tables, the code's object model might
then closely parallel that structure of windows things and/or database
things. And even if the design efforts lead to a better situation - an
orthogonal object model full of healthy design patterns - the usual "event
driven" Visual Basic coding cycle may still overlook many opportunities for
serendipitous design improvement discoveries.

These habits force code towards a high degree of "design cruft".

The solution is to ensure the code can always be changed, by rigorously
applying Design by Contract and/or Unit Tests (a.la. VbUnit) written at the
same time as one writes the tested features. (This will also go very far to
reduce incidences of the notorious VB bug hunts.)

Then, during analysis requirements, the design cycle, >and< coding, one
seeks and aggressively removes both duplication and "If" statements that
check types. The potential for reuse and flexibility will increase.

----8<--------------------------

I'm not talking about what the language itself can do, I'm talking about the
things its editor makes easy, which often leads to programmers with little
education performing a long list of goofs and sins.

About the anti-MS bias, are you aware that every software vendor out there has
a "Microsoft plan", meaning either a strategy or a parachute for if MS within
its dark tower turns the gleam of its eye in their direction? Bashing MS is a
survival skill in some areas.

> Are you even aware of the things you CAN do in VB? TCP socekts
> programming, Database programming, any agorithm you can implement in C
> or C++ can also be done in VB, etc. etc.

So what? I can do them in assembler. Look up "Turing Complete".

Are you even aware we can do all those things in Python, Ruby, Oberon, Caml,
Haskell, or Intercal? We use those languages because, without an over-produced
editor to lean on, they must use only the merits of their language itself.

--
Phlip

chuckeasttom

unread,
Aug 24, 2002, 2:41:59 PM8/24/02
to
Donovan Rebbechi <elf...@panix.com> wrote in message news:<slrnameaqb....@panix2.panix.com>...

Mr. Rebbechi,
Since you have been polite in your commentary I will respond with
equal civility. I do want to first thank you for your civil input. It
is greatly appreciated.

> In article <46fa0e70.02082...@posting.google.com>, chuckeasttom
> wrote:
>
> > What is wrong with you people? The term 'evaluation operator' is just
> > a description. The idea is that it evaluates whether or not the two
> > items are equal...
>
> The problem is that it's a poor description (the additive/multiplicative
> operators also "evaluate" operators. There are even other boolean "evaluation"
> operators, like <,>,<=,>=,!=,||,&&)
>

Now that is a good point. Explained that way I will agree, and even
change the site. Very good point indeed, and I had not thought of it
that way.

> > You act like every answer must be a verbatim quote
> > from the HOLY ISO STANDARDS...get a grip?
>
> Idiosyncratic terminology is OK as long as it is clear.
>

Agreed.

<snip>

I will agree with you. And I have even changed that on my site
already. It may not work in future compilers. I thank you for your
input and apoligize for getting uptight with you. I was venting on
you for some rude comments others made, and that is inexcusable....I
offer you my sincere apology and thanks for your time and comments.


> Cheers,

chuckeasttom

unread,
Aug 24, 2002, 2:47:33 PM8/24/02
to
Daniel Frey <danie...@aixigo.de> wrote in message

Mr. Frey,

You are another who has given very good advice in a civil manner.
In fact most of the posters have. I would like to thank you for your
civility and your advice. Below are my responses to your points.

news:<3D662BBF...@aixigo.de>...
> chuckeasttom wrote:
> >
>
> > Donovan Rebbechi <elf...@panix.com> wrote in message news:<slrnamaknc.
> 3na.e...@panix2.panix.com>...


> >
> > > (*) THere's no "Evaluation operator". Should be "equality operator".
> >
>
> > I would like a source for that. I have, several times, read
> > "evalution" and "assignment operator"...
>

> Once more: Please buy a copy of the C++ standard, it costs $18 and
> defines the language. All other sources (books, postings, etc.) is not
> helping, as you will find an example of almost everything you like. If
> you don't have the ISO/IEC 14882 C++ standard, you can't teach C++, all
> you will teach is some funny dialect of C++ which will not be
> compatible. Teaching german can't be done by someone who is german,
> lives in german but speaks only bavarian :)
>

Good analogy. My explanation onf the use of the term evalutation
operator was given in another posting. Then another kind poster came
back with a good analogy. I will be changing that term on my site by
the time you read this message.


> > but it is pretty darn common and useful. I never claimed to only show
> > students stict ansi C++. THe first 1/2 the class is...but after that
> > I show them whatever is commonly used.
>

> But they have no chance to understand this difference when they just
> started to learn C++. They have difference compilers at home or in their
> company and all that will work is standard C++, not some #include
> <iostream.h> that works for you...

I have already changed the iostream.h. I have four C++ compilers and,
as several people pointed out, it would not work with one of them. I
am also adding the caveat that itoa is used commonly, but is not ISO
standard and may not be supported by all compilers. Please look at
the sites changes and let me know your thoughts.

>
> > > (*) the behaviour of ++x vs x++ has to do with the return values of t
> hose
> > > functions, it has nothing to do with the "order" of operations.
> > >
> > Well thats just not true. If you put the ++ before the x, it operates
> > differently than putting it after. That is why they are called prefix
> > and postfix operators.
>

> You haven't understood the point of Donovan. The order of operation is
> not affected. It is all described in the C++ standard.

I understand your point, but as a practical matter consider this:
int x,y;
x = 8;
y = x++;

At this point, in every c++ compiler I have tried, y is still 8. The
assignment took place prior to the ++ operation. However if I write:

y = ++x;

Then in every single compiler I try it, y does indeed equal 9...the
increment to place prior to the assignment.

Are you claiming that this is not the case?

>
>
> > IT is simply raw beginners first intro to try catch blocks...thats it,
> > nothing more.
>
> It's like giving a hand grenade to some 5-year-old kids but don't
> telling them about this funny little ring. Either you explain something
> (try/catch) completly (or at least sufficiently complete to make it a
> useful tool) or you leave it away. Mentioning some buzzwords will not
> gain you any expertise, IMHO. If you like, you can put the stuff you
> don't explain deep to an appendix to give some preview of comming
> attractions in "programming III".

I will accept that suggestion, and I will remove it.
>

chuckeasttom

unread,
Aug 24, 2002, 2:48:57 PM8/24/02
to
"|{evin" <Matthew...@Melissa.insightbb.Malayna.com> wrote in message news:<%DC99.230466$sA3.3...@rwcrnsc52.ops.asp.att.net>...


I cannot believe you have never encountered itoa...and yes I know this
is usenet. Do you realize that snide comments like what you ended
with usually get hostile responses?? ONes like "kiss my ass"...

John Harrison

unread,
Aug 24, 2002, 2:52:04 PM8/24/02
to
> >
> > You haven't understood the point of Donovan. The order of operation is
> > not affected. It is all described in the C++ standard.
>
> I understand your point, but as a practical matter consider this:
> int x,y;
> x = 8;
> y = x++;
>
> At this point, in every c++ compiler I have tried, y is still 8. The
> assignment took place prior to the ++ operation. However if I write:
>
> y = ++x;
>
> Then in every single compiler I try it, y does indeed equal 9...the
> increment to place prior to the assignment.
>
> Are you claiming that this is not the case?
>

Its not the case, and clearly you don't understand. y == 8 does not mean
that the increment happened after the assignment, all it means is that the
value of x++ is 8, therefore 8 gets assigned to y.

This is the true order

1) Compiler saves the value of x (8) in some temporary location
2) Compiler increments x (to 9)
3) Compiler assigns temporary location to y

john

chuckeasttom

unread,
Aug 24, 2002, 3:11:59 PM8/24/02
to
Per.St...@kau.obliterate.se (Per Str?gren) wrote in message news:<3d661e68....@nyheter.chalmers.se>...
> Chuck,
>
> If you use the <PRE> and </PRE> HTML tags around your C(++) code most
> of these errors wouldn't show up. The web browsers make a mess of your
> code. Use the PRE tag and the life will be easier for the people who
> actualy tries your code.
>
> Having said that, some of the mess is your fault, it seems, having
> listened to our collegues around here...
>
> Per.
>
>
First of all yours is a good suggestion, and I have made some changes
to the site, you might want to recheck it and give me your thoughts.
Also thank you for giving me your input in a very civil manner. It is
much appreciated.

Secondly, is some of this my fault?? Of course it is. BUt read my
posts. To those who simply gave me feed back in a civil tone, like you
just did, I thanked them for their input and I implemented most of it.
Some of it I asked for further clarification on. I only got rude
with 3 or 4 who chose to be rude, snide, and condescending with me.
My policy is simple: if someone gives me civil input, I consider it
and thank them for it. If someone wishes to act uncivilly with me,
then I will respond, usually much ruder than they where. I have
discovered after 10 years of roaming usenet, that this is the only way
to deal with condescending people on the net.

Richard Heathfield

unread,
Aug 24, 2002, 3:20:19 PM8/24/02
to
chuckeasttom wrote:
>
> Daniel Frey <danie...@aixigo.de> wrote in message
>
<snip>

> >
> > You haven't understood the point of Donovan. The order of operation is
> > not affected. It is all described in the C++ standard.
>
> I understand your point, but as a practical matter consider this:
> int x,y;
> x = 8;
> y = x++;
>
> At this point, in every c++ compiler I have tried, y is still 8. The
> assignment took place prior to the ++ operation. However if I write:
>
> y = ++x;
>
> Then in every single compiler I try it, y does indeed equal 9...the
> increment to place prior to the assignment.

No, it didn't. The increment took place first. The *expression*,
however, returns the value of x as it stood prior to the increment
taking place. Thus, if I can cobble together a mythical but hopefully
easy-to-grok assembly language, we have:

mov temp, x
inc x
mov y, temp

>
> Are you claiming that this is not the case?

Yes. There is an excellent illustration of this in code posted
elsethread.


<snip>

Stephen Smith

unread,
Aug 24, 2002, 5:38:22 PM8/24/02
to
"chuckeasttom" wrote in message:

> I cannot believe you have never encountered itoa...and yes I know this
> is usenet. Do you realize that snide comments like what you ended
> with usually get hostile responses?? ONes like "kiss my ass"...

Afraid I'm guilty of not using itoa() too. It's official; just done a hard
drive scan for the occurrence of "itoa" and not one iota of itoa. :o)

Got a few atoi() 's, however...

I'll get my coat. ;-)

Stephen.


chuckeasttom

unread,
Aug 24, 2002, 6:05:40 PM8/24/02
to
"|{evin" <Matthew...@Melissa.insightbb.Malayna.com> wrote in message news:<xyC99.10722$_91....@rwcrnsc51.ops.asp.att.net>...

>
> > Yes..and it still comes out the same. You can nitpick on
> > terminology...I guess you have no life to get back to,
> > but the bottom line in the real world is this: If I put
> > the ++ operator after a variable with an assignment
> > operator, the assignment will take place first. For
> > example
> >
> > int x,y;
> > x = 7;
> > y = x++;
> > cout y;
> >
> > Guess what folks...y will print out as 7 NOT AS 8... you
> > all know that and agree with it. Rather than move on you
> > wish to argue incessently over nothing..
> >
>
>
> Hmm... wonder what 'y = ++x;' would do.. It's not that programmers
> have no life... we just like doing it right the first time. Employers
> like that.
>

It would print out 8, because using the operator before means that the
increment happens before the assignment....Are you saying thats not
correct?

> > Kiss my ass...
>
> I'm beginning to doubt your claim of being an instructor. Every
> instructor I've ever had understands the importance of standards, and
> the idea that just because something happens to work in a given
> situation doesn't mean that it's the correct solution.
>

In any case I do understand that standards are important. I do agree
that we need them. What I disagree with is the small but vocal
minority in this newsgroup that treats ISO standards like the Holy
Word of God and blasts anyone who dares deviate one inch from them....
That sounds more like religious fanatacism to me than programming.


> >
> > GET A FREAKING GRIP!!!!!! YOU CAN USE IT IN SEVERAL
> > COMPILERS AND IT FREAKING WORKS.. SOME OF US ACTUALLY TRY
> > TO WRITE WORKING CODE..NOT ARGUE OVER BULLSHIT ALL DAY.
>
>
> 'Several', so... if I learn to code from you, then I'm constrained to
> use just those compilers on specific platforms. Why not learn the
> standard and do it right? When I do that, I won't have to worry about
> what compiler, OS, or environment I'm working in. Well, not very much
> anyway. :)
>
> btw, using all caps is considered shouting, and rude.. please see
> about getting that keyboard fixed, mmkay?


I was shouting....

Mark McIntyre

unread,
Aug 24, 2002, 5:57:28 PM8/24/02
to
On 24 Aug 2002 11:48:57 -0700, in comp.programming ,
chucke...@yahoo.com (chuckeasttom) wrote:

>"|{evin" <Matthew...@Melissa.insightbb.Malayna.com> wrote in message news:<%DC99.230466$sA3.3...@rwcrnsc52.ops.asp.att.net>...
>> chuckeasttom wrote:
>> > Jack Klein <jack...@spamcop.net> wrote
>> >>

>> >> Then learn the
>> >> subject matter you want to put on your page before you
>> >> actually put it their and expose it to the public.
>> >
>> > Oh I am so sorry you don't like itoa..however it is
>> > widely used and supported by a boatload of
>> > compilers...Now perhaps you learn what constructive
>> > criticism is,,,like several on this board have...or just
>> > keep being a rude asshole...
>>
>> Again... how widely? I've never used it.
>

>I cannot believe you have never encountered itoa..

why should anyone be surprised at that? its a nonstandard proprietary
extension to the language, available on a small miniority of
compilers, in a subsegment of the computing world. There's no reason
to assume that "all the world's a whateveritis"

And by the way, your rude responses to criticism are puerile and
stupid. You asked for criticism, and then when you don't like it, you
hurl insults. Grow up.
--
Mark McIntyre
CLC FAQ <http://www.eskimo.com/~scs/C-faq/top.html>
CLC readme: <http://www.angelfire.com/ms3/bchambless0/welcome_to_clc.html>

George Copeland

unread,
Aug 24, 2002, 6:20:34 PM8/24/02
to
"chuckeasttom" <chucke...@yahoo.com> wrote in message
news:46fa0e70.02082...@posting.google.com...

> Also, after a lot of helpful suggestions, I have just finished


> drastically altering my Visual Basic encryption page, and would like
> to hear your opinions.
> I have changed the content, added links, and added appropriate caveas.
> http://www.geocities.com/~chuckeasttom/vb/Vb.htm

It is finally clear that the page contains no real encryption information,
so it is no longer vomitous. Now it is just useless.


George Copeland

unread,
Aug 24, 2002, 6:47:17 PM8/24/02
to
"Ioannis Vranos" <noi...@spammers.get.lost.hotmail.com> wrote in message
news:10301573...@athprx02.forthnet.gr...

> "VB is not really for programming. VB is only suitable for drawing


> interfaces. C++ on the other hand is a real programming language".

IMO, if a programmer is not capable of understanding the strengths of VB, he
is not capable of understanding the strengths of C++ either.


Mark McIntyre

unread,
Aug 24, 2002, 6:53:50 PM8/24/02
to
On 24 Aug 2002 15:05:40 -0700, in comp.programming ,
chucke...@yahoo.com (chuckeasttom) wrote:

>"|{evin" <Matthew...@Melissa.insightbb.Malayna.com> wrote in message news:<xyC99.10722$_91....@rwcrnsc51.ops.asp.att.net>...
>>

(chuckeasthom said)
>> > Kiss my ass...


>>
>> Every instructor I've ever had understands the importance of standards, and
>> the idea that just because something happens to work in a given
>> situation doesn't mean that it's the correct solution.
>>
>In any case I do understand that standards are important. I do agree
>that we need them. What I disagree with is the small but vocal
>minority in this newsgroup that treats ISO standards like the Holy
>Word of God and blasts anyone who dares deviate one inch from them....
>That sounds more like religious fanatacism to me than programming.

Some people round here, and more so in CLC, believe that the Standards
define how the language works. If you ignore or deviate from them, eg
by assuming your implementation's extensions are generally accepted ro
that how your implementation handles certain conversions or errors is
the only way its done, then you will write bad code because it will
break on some other system. If you consider it fanaticism to write
syntactically and logically correct code that also happens to be
maximally portable, then I agree, we're fanatics. I prefer that to
writing sloppy, poorly thought out code relying on platforms specific
bodges and hacks.

>> > GET A FREAKING GRIP!!!!!! YOU CAN USE IT IN SEVERAL
>> > COMPILERS AND IT FREAKING WORKS.. SOME OF US ACTUALLY TRY
>> > TO WRITE WORKING CODE..NOT ARGUE OVER BULLSHIT ALL DAY.
>>
>> 'Several', so... if I learn to code from you, then I'm constrained to
>> use just those compilers on specific platforms.

The function itoa() does not work on many compilers,and teaching
people about it is as much use as teaching about clrscr(), GetDC() and
its friends. If you want to teach C or C++, teach it, not MS's or
Borland's implementation of it. If you want to do the latter, then say
so and nobody will be concerned any further.

>> btw, using all caps is considered shouting, and rude.. please see
>> about getting that keyboard fixed, mmkay?
>
>I was shouting....

The stop it.

Donovan Rebbechi

unread,
Aug 24, 2002, 8:00:43 PM8/24/02
to
In article <46fa0e70.02082...@posting.google.com>, chuckeasttom
wrote:
> I will agree with you. And I have even changed that on my site
> already. It may not work in future compilers. I thank you for your
> input and apoligize for getting uptight with you. I was venting on
> you for some rude comments others made, and that is inexcusable....I
> offer you my sincere apology and thanks for your time and comments.

Accepted. I understand that some of the posters here tend to be rather blunt:
you're certainly not the first person who's taken offense to their tone.
I'm glad you were able to look past the tone of some of the comments, and get
something out of this discussion.

Cheers,
--
Donovan

Ioannis Vranos

unread,
Aug 24, 2002, 8:48:37 PM8/24/02
to
"chuckeasttom" <chucke...@yahoo.com> wrote in message
news:46fa0e70.02082...@posting.google.com...
>
> Secondly, is some of this my fault?? Of course it is. BUt read my
> posts. To those who simply gave me feed back in a civil tone, like
you
> just did, I thanked them for their input and I implemented most of
it.
> Some of it I asked for further clarification on. I only got rude
> with 3 or 4 who chose to be rude, snide, and condescending with me.
> My policy is simple: if someone gives me civil input, I consider it
> and thank them for it. If someone wishes to act uncivilly with me,
> then I will respond, usually much ruder than they where. I have
> discovered after 10 years of roaming usenet, that this is the only
way
> to deal with condescending people on the net.


I haven't read the entire thread, but if this is the case, the better
is *to not answer* to those who insult you. I have been in similar
waters in the past in another newsgroup.

Ioannis Vranos

unread,
Aug 24, 2002, 9:00:10 PM8/24/02
to
"chuckeasttom" <chucke...@yahoo.com> wrote in message
news:46fa0e70.02082...@posting.google.com...
>
> In any case I do understand that standards are important. I do
agree
> that we need them. What I disagree with is the small but vocal
> minority in this newsgroup that treats ISO standards like the Holy
> Word of God and blasts anyone who dares deviate one inch from
them....
> That sounds more like religious fanatacism to me than programming.


You do not understand. The standard is extremelly important. The
standard provides the necessary guarantees and guidelines about the
basic features of the language. The standard mentions what can be
considered portable across all architectures (hardware or OS) and what
system specific.


For example the standard guarantees that you can read any structure as
an unsigned char.


For example the code:


#include <iostream>

int main()
{
using namespace std;

class A
{
int x;
public:
A(int r):x(r){}
}a(7);

// works only for concrete types and single inheritance
unsigned char *p=reinterpret_cast<unsigned char *>(&a);

for(unsigned long i=0; i<sizeof(a); i++)
cout<<static_cast<int>(p[i])<<" ";
}


is ***guaranteed*** to work without any problem anywhere anytime. This
code shows the internals (including the possible padding bits) of
object a. So the application cannot crash on Windows or another OS (in
this way you can read & copy any structure, all structures are a
sequence of unsigned chars).


So as you can see the standard guarantees what you can do in a
portable way. A compiler should not violate the aabove principle. If
the program crashes then it is a compiler defect (bug).


So if some compiler violates the standard, is *broken*.


So ANSI/ISO C++ standard is indeed HOLY.

Ioannis Vranos

unread,
Aug 24, 2002, 9:05:48 PM8/24/02
to
"Richard Heathfield" <bin...@eton.powernet.co.uk> wrote in message
news:3D675BDD...@eton.powernet.co.uk...

>
> > "VB is not really for programming. VB is only suitable for drawing
> > interfaces. C++ on the other hand is a real programming language".
>
> Ioannis, that's a ludicrous claim. VB is a perfectly reasonable
> programming language, for those who like that kind of thing. It may
not
> be your cup of tea, but that's more or less irrelevant. People think
> about programming in *different* ways, and that's why there are
> different languages. Who are you to say that someone who thinks in a
VB
> way should be excluded from programming?


I just said my opinion. My opinion is that VB is a nice
system-dependent tool for building interfaces. Do you disagree? Well,
that means you have a different opinion. It's a free world.


>
> > Also the dog is not needed.
>
> Purely a matter of taste, and hardly a relevant criticism, when
there
> are so many more important points to make.


I still believe that the dog is not needed. :)


> > 2) Do not mix ANSI C++ code & concepts with Visual C++ extensions.
>
> Not when explaining the language, anyway. Of course, there are times
> when we *need* platform-specific extensions, but we ought at least
to
> know when we are using them and why.


Yes.


> > 3) Learn C++ (i am learning too). Since you know the basics, i
suggest
> > "The C++ Programming Language" 3rd Edition or Special Edition by
> > Bjarne Stroustrup (the creator of C++). The reading will take a
> > couple+ years, but this is what it takes for people to become
better
> > programmers.
>
> This is sound advice.


Thanks.

> > I do not think that VB-specific content is useful.
>
> Well, you wouldn't, would you? But some VB programmers might
consider
> VB-specific content useful.


Yes. Still i do not think it is useful. :)

> > A better
> > system-level but wide approach would be .NET and perhaps there you
can
> > use VB.
>
> How noble of you to allow that generous concession. Look, if the guy
> wants a VB Web page, why *shouldn't* he have one? The world is not
> defined by your prejudices.


Do you mean that i oppress him because i am saying my opinion?

Ioannis Vranos

unread,
Aug 24, 2002, 9:10:29 PM8/24/02
to
"chuckeasttom" <chucke...@yahoo.com> wrote in message
news:46fa0e70.02082...@posting.google.com...
>
> > 2) Do not mix ANSI C++ code & concepts with Visual C++ extensions.
>
> Ahhh yes the old anything from Microsoft is evil bs...


No, Microsoft is not evil. :) I am just saying that system extensions
must be encapsulated under a portable interface in a specific section
of the code where that is possible.


> If VB ios not
> really for programming and only suitable for drawing interfaces,
then
> the thousands of professional programmers using itwill really be
> suprised.


Probably. But keep in mind that the whole Visual Studio is written in
C++ (including VB).

> As will the many businesses using VB or VC++....
>
> Are you even aware of the things you CAN do in VB? TCP socekts
> programming, Database programming, any agorithm you can implement in
C
> or C++ can also be done in VB, etc. etc.


:) Keep in mind that Windows are written in C++ too. VB is nice for
Windows interface programs. I know VB 6 myself too, have done some
interface (prrogram) to a database using ADO. Now i am learning .NET
which is a *must* for the MS world.

chuckeasttom

unread,
Aug 25, 2002, 12:01:58 AM8/25/02
to
"John Harrison" <jahha...@spam.ntlworld.com> wrote in message news:<JBQ99.3446$rn1.1...@newsfep1-win.server.ntli.net>...

And clearly you don't get the practical side... it does not matter
what the "true order" is. The effect is the same. If you use the
increment operator before the variable:
y = ++ x;

Then y = 9

if not then y will still = 8 even thought x has been incremented...

chuckeasttom

unread,
Aug 25, 2002, 12:05:25 AM8/25/02
to
"Phlip" <phli...@my-deja.com> wrote in message news:<EgP99.5565$3u7.48...@newssvr13.news.prodigy.com>...

> "chuckeasttom" wrote:
>
> > > "VB is not really for programming. VB is only suitable for drawing
> > > interfaces. C++ on the other hand is a real programming language".
> > > Also the dog is not needed.
> > >
> > > 2) Do not mix ANSI C++ code & concepts with Visual C++ extensions.
> >
> > Ahhh yes the old anything from Microsoft is evil bs...If VB ios not
> > really for programming and only suitable for drawing interfaces, then
> > the thousands of professional programmers using itwill really be
> > suprised. As will the many businesses using VB or VC++....
>
><big snip>
> I'm not talking about what the language itself can do, I'm talking about the
> things its editor makes easy, which often leads to programmers with little
> education performing a long list of goofs and sins.
>

Not only do I agree with you, but even VB programmers journal does.
They did an editorial a few years back entitled "why VB gets no
respect"
However the poster I was responding to certainly seemed to be claiming
that one cannot do good programming with VB.


>
> > Are you even aware of the things you CAN do in VB? TCP socekts
> > programming, Database programming, any agorithm you can implement in C
> > or C++ can also be done in VB, etc. etc.
>
> So what? I can do them in assembler. Look up "Turing Complete".
>
> Are you even aware we can do all those things in Python, Ruby, Oberon, Caml,
> Haskell, or Intercal? We use those languages because, without an over-produced
> editor to lean on, they must use only the merits of their language itself.

Yes I am aware that you can do all those things in other languages.
Again you might try reading the thread closer before jumping in. The
other poster was insinuating that one cannot do real programming in
VB. I was countering that you can.

chuckeasttom

unread,
Aug 25, 2002, 12:07:42 AM8/25/02
to
Richard Heathfield <bin...@eton.powernet.co.uk> wrote in message news:<3D66AE2C...@eton.powernet.co.uk>...
> chuckeasttom wrote:
> >
> > Richard Heathfield <bin...@eton.powernet.co.uk> wrote in message news:<3D65ED90...@eton.powernet.co.uk>...
> > > >
> <about 140 lines snipped>
> > >
> > > Now please, either apologise to Ron for insulting him, or crawl back
> > > into your cess-pit and shut up about C++ forever. I don't care which.

> >
> > How about this...go bugger your mother you pompous and condescending bastard...
>
> I freely admit my knowledge of the American language is somewhat sparse,
> but this doesn't look to me like an apology.


No it is not one..but I thoughtthat, bugger was a more common
explitive in england. In the U.S. the term is usually 'fuck'... and
if you continue to be pompous and snide, I will continue to be rude
and insulting. If you post without the snide condescension, then I
will drop the rude insults...pretty simple...

chuckeasttom

unread,
Aug 25, 2002, 12:08:38 AM8/25/02
to
Default User <first...@company.com> wrote in message news:<3D66AE5F...@company.com>...

> chuckeasttom wrote:
>
> > How about this...go bugger your mother you pompous and condescending bastard...
>
> And the winnah in the How To Make Friends and Influence People contest
> is . . . .
>
> Not this guy. What a maroon.
>
>
> Brian Rodenborn

So people being rude and condescending to me is OK..but if I respond
hostily then I am wrong.....interesting philosophy you have...

Anthony Ventimiglia

unread,
Aug 25, 2002, 12:14:02 AM8/25/02
to
On 24 Aug 2002 15:05:40 -0700, chuckeasttom
<chucke...@yahoo.com> wrote:
> [snip] What I disagree with is the small but vocal

> minority in this newsgroup that treats ISO standards like the Holy
> Word of God and blasts anyone who dares deviate one inch from them....

From where I'm standing it looks like you're off by a few feet.

Ioannis Vranos

unread,
Aug 25, 2002, 12:34:09 AM8/25/02
to
"chuckeasttom" <chucke...@yahoo.com> wrote in message
news:46fa0e70.02082...@posting.google.com...


Richard Heathfield is a c00l dud3. Do not insult him, he is a great
coder. If you feel you are insulted, do not reply to those messages.
Else the flame never ends.

Donovan Rebbechi

unread,
Aug 25, 2002, 12:42:15 AM8/25/02
to
In article <46fa0e70.02082...@posting.google.com>, chuckeasttom
wrote:
> "John Harrison" <jahha...@spam.ntlworld.com> wrote in message
> news:<JBQ99.3446$rn1.1...@newsfep1-win.server.ntli.net>...

>> 1) Compiler saves the value of x (8) in some temporary location
>> 2) Compiler increments x (to 9)
>> 3) Compiler assigns temporary location to y
>>
>> john
>
> And clearly you don't get the practical side... it does not matter
> what the "true order" is.

There is nothing "practical" about having an incorrect understanding of the
tools you are using.

The truth to "the practical side" is that it does matter what the order is.

> The effect is the same. If you use the

I've already offered a contrived example where the output demonstrates that
the effect is not always the same. While it *was* contrived, the low precedence
of the assignment operator does have important consequences with respect to
exception safety, and techniques like expression templates.

--
Donovan

res19j1c

unread,
Aug 25, 2002, 2:32:56 AM8/25/02
to
> > > Also the dog is not needed.
> >
> > Purely a matter of taste, and hardly a relevant criticism, when
> there
> > are so many more important points to make.
>
>
> I still believe that the dog is not needed. :)

Am I missing somthing? I only see a dinosaur.


res19j1c

unread,
Aug 25, 2002, 2:48:53 AM8/25/02
to
and it should probably say: If you're not up to the challange it will eat
you alive!

or: If you aren't up to the challange it will eat you alive!

instead of: If your not up to the challange it will eat you alive!


Ioannis Vranos

unread,
Aug 25, 2002, 3:13:40 AM8/25/02
to
"res19j1c" <res1...@verizon.net> wrote in message
news:sS_99.833$mb....@nwrddc01.gnilink.net...


It is a dog dinosaur.

Thomas Stegen CES2000

unread,
Aug 25, 2002, 5:11:29 AM8/25/02
to
"chuckeasttom" <chucke...@yahoo.com> wrote in message
news:46fa0e70.02082...@posting.google.com...

In case you missed it, here is a clue:

You started the rudeness!

Oh, it all makes so much sense that it hurts. But not to you
I suppose.

Tell me something, how is this rude in any way?
Ron Natalie said:
>
> I recommend that you actually learn something about C++ before
> you purport to teach it to the unsuspecting masses (of course,
> that certainly hasn't ever stopped certain text book authors).

Now tell me, how is this rude in any way?
chuckeasttom said:
>
> Or perhaps you ought to not simply be an asshole....but thats probably
> not possible for you. I have written professional C++ code for
> years...and that code is standard and compiles under multiple
> compilers...


--
Thomas.

Approaching singularity.


Thomas Stegen CES2000

unread,
Aug 25, 2002, 5:28:39 AM8/25/02
to
"chuckeasttom" <chucke...@yahoo.com> wrote in message
news:46fa0e70.02082...@posting.google.com...
> "|{evin" <Matthew...@Melissa.insightbb.Malayna.com> wrote in message
news:<xyC99.10722$_91....@rwcrnsc51.ops.asp.att.net>...
> >
> > > Yes..and it still comes out the same. You can nitpick on
> > > terminology...I guess you have no life to get back to,
> > > but the bottom line in the real world is this: If I put
> > > the ++ operator after a variable with an assignment
> > > operator, the assignment will take place first. For
> > > example
> > >
> > > int x,y;
> > > x = 7;
> > > y = x++;
> > > cout y;
> > >
> > > Guess what folks...y will print out as 7 NOT AS 8... you
> > > all know that and agree with it. Rather than move on you
> > > wish to argue incessently over nothing..
> > >
> >
> >
> > Hmm... wonder what 'y = ++x;' would do.. It's not that programmers
> > have no life... we just like doing it right the first time. Employers
> > like that.
> >
>
> It would print out 8, because using the operator before means that the
> increment happens before the assignment....Are you saying thats not
> correct?


Guess what, this program exhibits undefined behavior

#include <stdio.h>

int main(void)
{
int y = 42;
y = y++;
return 0;
}

Why, because you do not know when y will be incremented.
--
Thomas.

Approaching singularity.


Thomas Stegen CES2000

unread,
Aug 25, 2002, 6:13:30 AM8/25/02
to
"Phlip" <phli...@my-deja.com> wrote in message news:EgP99.5565
> Are you even aware we can do all those things in Python, Ruby, Oberon,
Caml,
> Haskell, or Intercal? We use those languages because, without an
over-produced
> editor to lean on, they must use only the merits of their language itself.


Yes, Intercal is surely the weapon of choice in many cases. I do not
tihnk one can use Intercal for anything but getting fired.

--
Thomas.

Approaching singularity.


Richard Heathfield

unread,
Aug 25, 2002, 5:38:10 AM8/25/02
to
chuckeasttom wrote:
>
<expletives snipped>

Oh, nothing left. Go figure.

Richard Heathfield

unread,
Aug 25, 2002, 5:44:43 AM8/25/02
to
chuckeasttom wrote:
>
<snip>


> So people being rude and condescending to me is OK..

No, it isn't okay. Neither is misconstruing constructive criticism as
rudeness and condescension, which is what you appear to be doing.

> but if I respond
> hostily then I am wrong.

Yes, of course it's wrong; hostility is not what Usenet is for.

> ....interesting philosophy you have...

Do you not think that it is better to attribute good motives to people
wherever that makes sense? You asked people for advice; they gave you
their honest opinions; and you recoiled from those honest opinions, and
saw in them a personal attack on you. I don't think that anyone intended
to attack you, and thus you misconstrued their intent; hence your rather
ridiculous response, which has done nothing to persuade people of your
case.

Note that nobody here has doubted your good intentions. If you really
want to help people to learn C++, why not go the extra mile and help
them to learn it properly?

chuckeasttom

unread,
Aug 25, 2002, 9:08:10 AM8/25/02
to
"George Copeland" <tma...@DELETETHISmail.com> wrote in message news:<SET99.4882$5Q4.209...@newssvr11.news.prodigy.com>...

And its finally clear that you are still a pompous ass...

chuckeasttom

unread,
Aug 25, 2002, 9:09:27 AM8/25/02
to
Mark McIntyre <markmc...@spamcop.net> wrote in message news:<i50gmu4bh13dji9vm...@4ax.com>...

> On 24 Aug 2002 11:48:57 -0700, in comp.programming ,
> chucke...@yahoo.com (chuckeasttom) wrote:
>
> >"|{evin" <Matthew...@Melissa.insightbb.Malayna.com> wrote in message news:<%DC99.230466$sA3.3...@rwcrnsc52.ops.asp.att.net>...
> >> chuckeasttom wrote:
> >> > Jack Klein <jack...@spamcop.net> wrote
> >> >>
> >> >> Then learn the
> >> >> subject matter you want to put on your page before you
> >> >> actually put it their and expose it to the public.
> >> >
> >> > Oh I am so sorry you don't like itoa..however it is
> >> > widely used and supported by a boatload of
> >> > compilers...Now perhaps you learn what constructive
> >> > criticism is,,,like several on this board have...or just
> >> > keep being a rude asshole...
> >>
> >> Again... how widely? I've never used it.
> >
> >I cannot believe you have never encountered itoa..
>
> why should anyone be surprised at that? its a nonstandard proprietary
> extension to the language, available on a small miniority of
> compilers, in a subsegment of the computing world. There's no reason
> to assume that "all the world's a whateveritis"
>
> And by the way, your rude responses to criticism are puerile and
> stupid. You asked for criticism, and then when you don't like it, you
> hurl insults. Grow up.

You might try reading the thread before making hasty judgements. To
anyone who gave me a civil reply I heartily thanked them, and even
implemented most of their suggestions. I only gave rude responses to
those who where snide and condescending...which is a very small
minority of posters...

chuckeasttom

unread,
Aug 25, 2002, 9:26:37 AM8/25/02
to
"Ioannis Vranos" <noi...@spammers.get.lost.hotmail.com> wrote in message news:<10302365...@athprx02.forthnet.gr>...

> "chuckeasttom" <chucke...@yahoo.com> wrote in message
> news:46fa0e70.02082...@posting.google.com...
> >
> > Secondly, is some of this my fault?? Of course it is. BUt read my
> > posts. To those who simply gave me feed back in a civil tone, like
> you
> > just did, I thanked them for their input and I implemented most of
> it.
> > Some of it I asked for further clarification on. I only got rude
> > with 3 or 4 who chose to be rude, snide, and condescending with me.
> > My policy is simple: if someone gives me civil input, I consider it
> > and thank them for it. If someone wishes to act uncivilly with me,
> > then I will respond, usually much ruder than they where. I have
> > discovered after 10 years of roaming usenet, that this is the only
> way
> > to deal with condescending people on the net.
>
>
> I haven't read the entire thread, but if this is the case, the better
> is *to not answer* to those who insult you. I have been in similar
> waters in the past in another newsgroup.

I have to admit that experience is showing you to be correct...

Mark McIntyre

unread,
Aug 25, 2002, 12:19:10 PM8/25/02
to
On 25 Aug 2002 06:09:27 -0700, in comp.programming ,
chucke...@yahoo.com (chuckeasttom) wrote:

>Mark McIntyre <markmc...@spamcop.net> wrote in message news:<i50gmu4bh13dji9vm...@4ax.com>...
>> On 24 Aug 2002 11:48:57 -0700, in comp.programming ,
>> chucke...@yahoo.com (chuckeasttom) wrote:
>>
>> And by the way, your rude responses to criticism are puerile and
>> stupid. You asked for criticism, and then when you don't like it, you
>> hurl insults. Grow up.
>
>You might try reading the thread before making hasty judgements.

I've been following the thread with great distaste from the very
beginning.

>To anyone who gave me a civil reply I heartily thanked them, and even
>implemented most of their suggestions. I only gave rude responses to
>those who where snide and condescending...

You gave rude responses to everyone who pointed out the gaping holes
in your knowledge, ie anyone who clearly had much more knowledge than
you. Your responses to them were without exception unpleasant and
gratuitous but surprisingly the other posters did NOT in general
respond in like, they showed rather more maturity.

If you're going to hang around in usenet, you'll have to get a _much_
thicker skin I'm afraid. You're also going to have to learn that if
you post badly wrong ideas, and claim to be a teacher, then the
serious gurus will respond rapidly in order to defend the innocents
from "learning" your errors.

>which is a very small minority of posters...

True. Thats because not very many people can be bothered to point out
so many errors.

Donovan Rebbechi

unread,
Aug 25, 2002, 1:03:56 PM8/25/02
to
In article <3d68...@nntphost.cis.strath.ac.uk>, Thomas Stegen CES2000 wrote:

> Why, because you do not know when y will be incremented.

Actually, it's because y is modified twice before a sequence point. For the
benefit of other posters in this thread, the following are sequence points:

,
;
||
&&
parentheses also count as a sequence point between a function call and its
entry point. eg This is OK: void f(int& x) { x++; } ; f(x++);

--
Donovan

Bob Bell

unread,
Aug 25, 2002, 2:08:16 PM8/25/02
to
chucke...@yahoo.com (chuckeasttom) wrote in message news:<46fa0e70.02082...@posting.google.com>...

> "John Harrison" <jahha...@spam.ntlworld.com> wrote in message news:<JBQ99.3446$rn1.1...@newsfep1-win.server.ntli.net>...
> > Its not the case, and clearly you don't understand. y == 8 does not mean
> > that the increment happened after the assignment, all it means is that the
> > value of x++ is 8, therefore 8 gets assigned to y.
> >
> > This is the true order
> >
> > 1) Compiler saves the value of x (8) in some temporary location
> > 2) Compiler increments x (to 9)
> > 3) Compiler assigns temporary location to y
> >
> > john
>
> And clearly you don't get the practical side... it does not matter
> what the "true order" is. The effect is the same. If you use the
> increment operator before the variable:
> y = ++ x;
>
> Then y = 9
>
> if not then y will still = 8 even thought x has been incremented...

So on the practical side, what will be the result of the following:

int x, y;

x = 8;
y = x++ + x++;

vs.

int x, y;

x = 8;
y = ++x + ++x;

Bob

Magnus Lidbom

unread,
Aug 25, 2002, 2:22:31 PM8/25/02
to
unless I'm missing something about sequence points those expressions are
both undefined.

From the standard:
"Between the previous and next sequence point an object shall have its
stored value modified at most once by the evaluation of an expression.
Furthermore, the prior value shall be read only to determine the value
to be stored."

Both


y = x++ + x++;

and


y = ++x + ++x;

Break that rule. Hence the language gives no guarantee what so ever
about the result.

You can find more info about the subject here:
http://www.embedded.com/story/OEG20020625S0041
It's far from complete though.

Regards /Magnus Lidbom


"Bob Bell" <bel...@pacbell.net> wrote in message
news:c87c1cfb.02082...@posting.google.com...

George Copeland

unread,
Aug 25, 2002, 3:03:37 PM8/25/02
to
"chuckeasttom" <chucke...@yahoo.com> wrote in message
news:46fa0e70.02082...@posting.google.com...

> And its finally clear that you are still a pompous ass...

We agree then. Your "encryption 101" page is useless.


Donovan Rebbechi

unread,
Aug 25, 2002, 4:22:15 PM8/25/02
to
In article <c87c1cfb.02082...@posting.google.com>, Bob Bell wrote:
>> And clearly you don't get the practical side... it does not matter
>> what the "true order" is. The effect is the same. If you use the
>> increment operator before the variable:
>> y = ++ x;
>>
>> Then y = 9
>>
>> if not then y will still = 8 even thought x has been incremented...
>
> So on the practical side, what will be the result of the following:
>
> int x, y;
>
> x = 8;
> y = x++ + x++;
>
> vs.
>
> int x, y;
>
> x = 8;
> y = ++x + ++x;

Both undefined because x is modified twice between sequence points.

But your point is a good one-- the simplistic explanation about order of
operations doesn't generalise well to more complex expressions like this:

while (start != end)
*dest++ = *start++ * slope + intercept;

--
Donovan

Richard Heathfield

unread,
Aug 25, 2002, 4:53:21 PM8/25/02
to
Bob Bell wrote:
>
<snip>

>
> So on the practical side, what will be the result of the following:
>
> int x, y;
>
> x = 8;
> y = x++ + x++;

Well, the real answer is of course that the behaviour is undefined. But
Chuck argues that the assignment happens first, so he expects this to be
the same as:

y = x + x;
x++;
x++;

and that would mean y is 16, and x is 10.

I tried this on three compilers: MS, Borland, and gcc. As it happens,
all three of them gave the answer Chuck would expect. (Undefined
behaviour has an irritating habit of giving solid and consistent results
when you don't want it to.) Therefore, it's easy to see why Chuck would
be misled into thinking this behaviour is well-defined and that the
assignment happens first. Nevertheless, we can easily prove that it does
not, and indeed code has been posted to this thread which shows that it
does not. All we need to do in order to make the proof complete is quote
the following part of the language definition:

13.5 (6) says in part: "It is not possible to change the precedence,
grouping, or number of operands of operators."

Consequently, the example shown elsethread must use the same grammar as
the int version of the operators it overloads, and therefore Chuck is
incorrect.

> vs.
>
> int x, y;
>
> x = 8;
> y = ++x + ++x;

Here, again the real answer is that the behaviour is undefined, but if
it *were* well-defined, I suspect Chuck would claim that the fact that
the ++ is now a prefix operator would mean that the ++ happens first, so
this example doesn't really further the debate IMHO.

Magnus Lidbom

unread,
Aug 25, 2002, 5:10:22 PM8/25/02
to
Perhaps this simple example will help to illustrate the problem:

#include <iostream>
using namespace std;

int main(int argc, char ** argv)
{
int i = 0;
cout << i++ << endl
<< i++ << endl
<< i++ << endl;

return 0;
}

When compiled on a microsoft compiler this has the somewhat humorous effect
of printing:
2
1
0

Compiled with g++ 3.1 it prints:
0
1
2

This is a pretty obvious example of not being able to count on anything when
something is undefined.
So dont go breaking the rules :)

/Magnus Lidbom


"Richard Heathfield" <bin...@eton.powernet.co.uk> wrote in message

news:3D6943C1...@eton.powernet.co.uk...

Phlip

unread,
Aug 25, 2002, 6:41:45 PM8/25/02
to
chuckeasttom wrote:

> Not only do I agree with you, but even VB programmers journal does.
> They did an editorial a few years back entitled "why VB gets no
> respect"
> However the poster I was responding to certainly seemed to be claiming
> that one cannot do good programming with VB.

When I left VB it had major bugs in its editor regarding a module's
requirements (all concocted to avoid the horrors of using an "import"
statement), and these bugs made integration simply unscriptable. We had to
integrate a huge project, manually, each time we tweaked something and
needed to see the full results.

Nowadays I integrate continuously, using scripts. I obey the Liskov
Substitution Principle, use hierarchical encapsulation, and do not define
my normal control-flow using exceptions.

I consider all of these things important for good programming.

I, and others, have compiled a >very< long list of individual problems with
VB here:

http://www.c2.com/cgi/wiki?ThingsWeHateAboutVb

Learning such a list for any language would be very good for a programmer.
Fortunately for us, this list for VB has the potential to teach us quite a
lot!

--
Phlip
http://www.greencheese.org/PeaceAndCalm
-- The first few lines of code must "hook" the
computer, and make it "care" about the program --

John Doherty

unread,
Aug 25, 2002, 6:28:42 PM8/25/02
to
In article <46fa0e70.02082...@posting.google.com>,
chucke...@yahoo.com (chuckeasttom) wrote:

> I will continue to be rude and insulting.

Is that what they taught you in divinity school?

--

John Doherty

unread,
Aug 25, 2002, 6:29:50 PM8/25/02
to
In article <p5%99.11276$3V5....@nwrddc02.gnilink.net>, "res19j1c"
<res1...@verizon.net> wrote:

Might be nice to run it through a spell-checker, too.

--

Phlip

unread,
Aug 25, 2002, 6:44:31 PM8/25/02
to
Thomas Stegen CES2000 wrote:

> "Phlip" wrote:
>> Python, Ruby, Oberon, Caml, Haskell, or Intercal?

> Yes, Intercal is surely the weapon of choice in many cases. I do not


> tihnk one can use Intercal for anything but getting fired.

I spiked my sample to see if the lab would catch the analyte ;-)

--
Phlip
http://www.greencheese.org/LucidScheming
-- Who needs a degree when we have Web e-search engines? --

res19j1c

unread,
Aug 25, 2002, 7:11:57 PM8/25/02
to
> > and it should probably say: If you're not up to the challange it will
eat
> > you alive!
> >
> > or: If you aren't up to the challange it will eat you alive!
> >
> > instead of: If your not up to the challange it will eat you alive!
>
> Might be nice to run it through a spell-checker, too.

heh. I just copied and pasted it. I didn't even notice that. It would have
been too challanging to speel-chek it all.


res19j1c

unread,
Aug 25, 2002, 7:28:00 PM8/25/02
to
> > > Python, Ruby, Oberon, Caml, Haskell, or Intercal?

> > Yes, Intercal is surely the weapon of choice in many cases. I do not
> > tihnk one can use Intercal for anything but getting fired.

> I spiked my sample to see if the lab would catch the analyte ;-)

Yep, Intercal makes IOCCC entries look like plain English!


Alexander Mueller

unread,
Aug 25, 2002, 8:12:04 PM8/25/02
to
Ioannis Vranos wrote:
>
> Richard Heathfield is a c00l dud3. Do not insult him, he is a great
> coder. If you feel you are insulted, do not reply to those messages.
> Else the flame never ends.

So one may insult and the other one must not?!

Alexander
--
*** Help stop animal brutality -- Send donations below ***
*** http://www.bi-gegen-pelztiermord.de/massenmord.htm ***

Author of the Chatsystem PINO!
Available at http://www.pino.org

Richard Heathfield

unread,
Aug 25, 2002, 9:26:30 PM8/25/02
to
Alexander Mueller wrote:
>
> Ioannis Vranos wrote:
> >
> > Richard Heathfield is a c00l dud3. Do not insult him, he is a great
> > coder. If you feel you are insulted, do not reply to those messages.
> > Else the flame never ends.
>
> So one may insult and the other one must not?!

But I didn't actually insult him, or at least I don't recall doing so.
He has reacted as if I had, but that's his problem, not mine. I
certainly didn't use the kind of coarse language he's been slinging
around.

Milan Gornik

unread,
Aug 25, 2002, 9:19:54 PM8/25/02
to
Hello everyone,

I joined this newsgroup just recently and really had no chance to see a lot
of useful posting here. I suppose that if I complain about the way you all
people use this group (no reasonable discussing, just arguing) then I'll be
advised not to read this newsgroup. Well, anyway, because I believe I'm not
the only one here that thinks this is going too far, I'll try to appeal to
all of you people who wants to participate in those never-ending fights to
start your own newsgroup. Yes, there are "egroups" at Yahoo, where you can
start your own chitchat group for free.

The second option is to stop replying to these threads. Well, I don't doubt
that many of you people feel insulted after all this discussion, and that
you still have so much comments you want to share with others, but I suggest
that we all stop this, because it's getting really boring and, after all,
nobody shows willingness to change his attitude.

Thank you,
I hope you'll agree with me (which means you won't continuously reply to
this)

p.s. Sorry if this was difficult to read, I'm not from the English-speaking
part of the world.

Milan Gornik

Phlip

unread,
Aug 25, 2002, 9:57:47 PM8/25/02
to
Milan Gornik wrote:

> I joined this newsgroup just recently and really had no chance to see a
> lot of useful posting here.

Which newsgroup? Programming? C++? or Basic,Visual?

> I suppose that if I complain about the way you
> all people use this group (no reasonable discussing, just arguing) then
> I'll be advised not to read this newsgroup.

Not at all; you are right to complain.

The situation is not usual, and is caused by one of the techniques that
"trolls" use. (A "troll" is a needy person with mental problems who feigns
an opinion to attract negative attention and generally clog a forum with
crap, but this diagnosis is not indicated here.) One of their favorite
techniques is to cross-post between several groups that ought to have
opposing advocacies. It happened last year between C++ and Java, for
example, leading to weeks of useless spewage.

This present situation is caused by someone with an immature attitude who
has mistook cross-posting for engaging in enlightened dialog.

It will die down as soon as the instigator stops taking offense at every
request that it die down.

In general (and with the help of http://groups.google.com) you will find
the technical quadrant of the USENET galaxy still healthy enough for one to
learn much theory and philosophy in. Stick around and tough it out. (Or
switch to a "moderated" group such as news:comp.lang.c++.moderated .)

> p.s. Sorry if this was difficult to read, I'm not from the
> English-speaking part of the world.

Your English was exemplary.

--
Phlip
http://andstuff.org/CelebrityImpersonations
-- "In my experience, the customer doesn't know what he wants
until you don't give it to him." --David Brady --

Ioannis Vranos

unread,
Aug 25, 2002, 11:48:41 PM8/25/02
to
"Milan Gornik" <so...@want.nospam> wrote in message
news:akbvth$c6t$1...@news.eunet.yu...

Yes, the thread is rather stupid. But you can ignore this thread (most
newsreaders support this functionality).


--
Ioannis

* Ioannis Vranos
* Programming pages: http://www.noicys.cjb.net
* Alternative URL: http://run.to/noicys


Ioannis Vranos

unread,
Aug 25, 2002, 11:52:11 PM8/25/02
to
"Alexander Mueller" <postm...@127.0.0.1> wrote in message
news:onea9.82213$y71.2...@news.chello.at...

> Ioannis Vranos wrote:
> >
> > Richard Heathfield is a c00l dud3. Do not insult him, he is a
great
> > coder. If you feel you are insulted, do not reply to those
messages.
> > Else the flame never ends.
>
> So one may insult and the other one must not?!


Well Richard is rather harsh to his remarks, but he is an OK person.
Just a bit aggressive. :)

It is loading more messages.
0 new messages