TIP: Click on subject to list as thread! ANSI
echo: c_echo
to: DARIN MCBRIDE
from: HERMAN SCHONFELD
date: 1998-04-13 09:40:00
subject: Event Handler

BB>    Yup. I did all that routinely, Herman, but 'for' loops require an
BB>int as control variable, don't they?
DM>Bill,
DM>  No, for loops can use whatever you want.  One often used method in
DM>linked lists is traversing them:
DM>list* l;
DM>for (l = FirstListItem(); l = ListNext(l); IsEndOfList(l))
DM>{
DM>  /* code */
DM>}
 HS> Since when?  Most compilers accept non-standard code,
 HS> so there's no use bitching about ansi-c rules, is
 HS> there? Why? Because I really don't care. If it compiles
 HS> and works efficiently it good enough for me.
DM>Why do we concern ourselves with ANSI rules?  So that when we post our
DM>questions and problems, that we can understand each other.  And so that
DM>when we post our code, that others can use it.
Most compilers accept non-standard code. And most people understand 
non-standard code aswell.
ie,
why bother to do something like
SomeType *mytime = (SomeType *)malloc(sizeof(SomeType))
when,
SomeType *mytype = malloc(.... etc
compiles. Even though ANSI-C++ forbids void * conversion it still works, 
doesn't it? I could go on and on about it but I assume you get the idea.
... Computers all wait at the same speed!
--- Ezycom V1.48g0 01fd016b
---------------
* Origin: Fox's Lair BBS Bris Aus +61-7-38033908 V34+ Node 2 (3:640/238)

SOURCE: echomail via exec-pc

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™.