| TIP: Click on subject to list as thread! | ANSI |
| echo: | |
|---|---|
| to: | |
| from: | |
| date: | |
| subject: | Squares |
Hello Bill!
Replying to a message of Bill Birrell to Darin McBride:
JB>>> and possibly even better re-written to use a char* instead
JB>>> for( s=target ; *s ; s++ ) {
>> Yes, I like this even more ;-)
BB> Not much point in using a for(;;) loop at all then. Why not just:-
BB> char *s=target;
BB> while(*s++) {...};
BB> simpler, neater, more direct.
See my previous point about pre-increment vs post-increment. While it's
unimportant here, think about a C++ object where each character, or each 60
characters are in a linked list, so an iterator goes through each one ...
and needs to copy itself to do the post-increment.
So, it's a matter of habit ;-)
Darin
---
* Origin: Tanktalus' Tower BBS (1:250/102)SEEN-BY: 633/267 270 @PATH: 250/102 99 10/345 106/1 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™.