why on earth write() isn't returning the number of bytes written?Because the write() method (which is just a thin wrapper round print()), does buffering, so it will never return having output less bytes than you requested (unless there's an error, in which case it returns false). So there's not a lot of point in returning the number of bytes written.
Dave.
In reply to Re: write/syswrite return value differences
by dave_the_m
in thread write/syswrite return value differences
by FreakyGreenLeaky
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |