Test of possible ACSGATE on net

Garth Kidd garth_kidd%680.808 at fidogate.fido.oz
Mon Oct 9 11:52:04 AEST 1989


Original to: csgtkidd at medusa.ua.oz
This is a test message, but while I'm at it, just a small question:
 
Can anyone think of a tighter way of coding a filter to strip spaces 
from the input stream than this?
 
main()
{
  char ch;
 
  for(;read(0,&ch,1)==1;write(1,&ch,(ch==' ')?0:1))
    ;
}
 
Thankew for any help...
 
 
gk 


---
 * Origin: Australian BBS Registry (Opus 3:680/808)



More information about the Comp.lang.c mailing list