| TIP: Click on subject to list as thread! | ANSI |
| echo: | |
|---|---|
| to: | |
| from: | |
| date: | |
| subject: | Pointers |
From: kkuzba{at}centurytel.net
To: c_echo{at}yahoogroups.com
* Author: Rob Swindell
RS> DMB> I don't see what the fascination is with cramming
RS> DMB> everything into a single statement.
RS> DMB> C just isn't built properly for that.
RS> I was simply answering a question about how to do an
RS> assignment/test in one expression and avoid warnings.
Certainly. It will sometimes fail, though, even when the
compiler allows it and it generates no warnings. I had a bit
of a time in Borland C++ 3.1 with assignments and compares in
a single statement. You would think that the order of execution
would allow it, but it didn't, so I had to start doing the calls
and assignments on one line, and then perform the comparison on
the next line all by itself. If I recall correctly, I was trying
to open a file and test the result all in one statement, but it
kept giving me a negative result on it. The same thing was going
on in Quick C 2.5 with dynamic memory allocation, I think. That
was fun to play around with. The code all looked perfect and the
executable compiled with no errors or warnings, but I couldn't
allocate memory or open a file. It was quite a stumbling block.
> kkuzba{at}centurytel.net http://home.centurytel.net/kkuzba
> 'A nasty drop, I'll bet,' said Sam.
--- SoupGate-Win32 v1.05
* Origin: kkuzba{at}centurytel.net (2:292/516.666)SEEN-BY: 633/267 270 @PATH: 292/516 854 140/1 106/2000 633/267 |
|
| SOURCE: echomail via fidonet.ozzmosis.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™.