Evaluation of ++ different in C and perl?

2006-10-19 Thread Norbert Preining
and all the best Norbert ---- Dr. Norbert Preining <[EMAIL PROTECTED]> Università di Siena Debian Developer <[EMAIL PROTECTED]> Debian TeX Group gpg DSA: 0x09C5B094 fp: 14DF 2E6C 030

Re: Evaluation of ++ different in C and perl?

2006-10-19 Thread Norbert Preining
Dr.Ruud wrote: $ perl -wle ' $a = 3; $b = 0 + (++$a) + ($a++); print "b=$b\n"; ' b=8 :) Nup, this is not the solution: $a = 3; $b = 0; $b = 0 + (++$a) + ($a++); $c = 3; $d = 0; $d = (++$c) + ($c++); print "b=$b\n"; print "d=$d\n"; prints: b=8 d=9 Don't tell me that in perl 0 + so

Re: Evaluation of ++ different in C and perl?

2006-10-19 Thread Norbert Preining
Derek B. Smith wrote: Lessons learned always initialize your variables to zero. : ) As I wrote, this is not the lesson. Even with initialization we have the same! Ciao Norbert -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Evaluation of ++ different in C and perl?

2006-10-19 Thread Norbert Preining
g Perl to students, and to get them to understand the difference between pre and post increment. Best wishes Norbert ------- Dr. Norbert Preining <[EMAIL PROTECTED]>Università di Siena De