home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / std_unix / volume.17 / text0030.txt < prev    next >
Encoding:
Internet Message Format  |  1990-01-06  |  1.3 KB

  1. From: uunet!munnari!cs.mu.oz.au!kre (Robert Elz)
  2.  
  3. > From: uunet!dg-rtp.dg.com!dg-rtp!meissner (Michael Meissner)
  4. > |  In article <401@longway.TIC.COM>, gwyn@BRL.MIL quotes someone:
  5. > |  > >1) my code be written in C
  6. > |  > >    b) portable to ALL UNIX SYSTEMS
  7.  
  8. > You still lose.  Under ANSI C the above program is not valid, since
  9. > printf is a varargs function that has no prototype in scope.
  10.  
  11. Nowhere does it mention ANSI C.  What's more, its clearly impossible
  12. to meet the requirements if ANSI C is required, since not ALL
  13. Unix systems have ANSI C compilers...
  14.  
  15. > While we are at it, main should return a valid exit status.
  16.  
  17. No quibbles there, though its not needed for the program to run.
  18.  
  19. >     #include <stdio.h>
  20.  
  21. You just blew it away, it was no accident that I didn't
  22. include stdio.h .. 6th edition unix (v6) and previous
  23. had no stdio.h (until the 6th edition stdio upgrade).
  24.  
  25. Your program no longer runs (even compiles) on ALL versions
  26. of unix.
  27.  
  28. And OK, I admit it, neither does mine, since I don't think there ever
  29. was a C compiler for 1st edition (PDP-7) unix.  If you want to get
  30. this technical (and I see no reason not to, given the absurd requirements
  31. laid out by the professor who set this assignment) there is truly
  32. no possible solution.
  33.  
  34. kre
  35.  
  36. Volume-Number: Volume 17, Number 35
  37.  
  38.  
  39.