home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / std_unix / mod.std.unix.v9 / text0023.txt < prev    next >
Encoding:
Internet Message Format  |  1987-06-30  |  1.5 KB

  1. From: seismo!cmcl2!phri!roy@sally.utexas.edu (Roy Smith)
  2. Date: Sun, 18 Jan 87 09:48:11 est
  3. Organization: Public Health Research Inst. (NY, NY)
  4.  
  5. [ The square brackets below were apparently inserted by Roy Smith;
  6. they were not added by the moderator.  -mod ]
  7.  
  8. > From: colonel@sunybcs.UUCP (Col. G. L. Sicherman)
  9. > Now, that [having tail count from 1 instead of 0 is] un-Unixican.
  10. > Characters start at 0, and perhaps blocks and lines should too.  As it
  11. > is, if I want a shell command or expression in the argument, I usually
  12. > have to add 1 to it to make it work.
  13.  
  14.     While we're it, make "cmp" call the first character in a file 0.
  15. At least on my 4.2BSD system, cmp says the first character in a file is 1.
  16. I would imagine most people only use cmp to test for equality of files, but
  17. I had reason to use the output of "cmp -l" the other day in a shell script
  18. and got burned my this.  Most likely, somebody needs to carefully go
  19. through every command in the book and ferret out count from 0/1 problems.
  20.  
  21.     Along those lines, what does it mean when some processor says
  22. "error in line 0, file foo"?  On the one hand, it makes computer sense to
  23. call the "first" line/character/block/whatever of a file 0.  On the other
  24. hand, it is very convienent to reserve "error in line 0" to mean "something
  25. went wrong before I even got a chance to start reading the file."
  26. -- 
  27. Roy Smith, {allegra,cmcl2,philabs}!phri!roy
  28. System Administrator, Public Health Research Institute
  29. 455 First Avenue, New York, NY 10016
  30.  
  31. Volume-Number: Volume 9, Number 24
  32.  
  33.