TIP: Click on subject to list as thread! ANSI
echo: cis.languages
to: all
from: Bob van der Poel 76510,2203
date: 1991-09-02 22:02:57
subject: #C fun

#: 12054 S3/Languages
    02-Sep-91  22:02:57
Sb: #C fun
Fm: Bob van der Poel 76510,2203
To: all

I ran into an interesting problem the other night. I code the following line:

   if(a==b==3)...

Of course, what I meant was:

  if(a==3 && b==3)...

Interesting thing is that the compiler accepted the code with no errors or
warnings. Looking at the assembler output it seems that the statement was
converted to if(a==3).

I would think that if anything it should have converted to:

   if(b==3){
     if(a==TRUE)...
   }

or something like that? Does anyone know what the legit conversion should be?
Might be a nice bit of triva...

There is 1 Reply.

SOURCE: compuserve via textfiles.com

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