home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / os / msdos / programm / 8991 < prev    next >
Encoding:
Internet Message Format  |  1992-09-02  |  2.6 KB

  1. Path: sparky!uunet!utcsri!bonnie.concordia.ca!hobbit.ireq.hydro.qc.ca!beaurega
  2. From: beaurega@ireq.hydro.qc.ca (Denis Beauregard)
  3. Newsgroups: comp.os.msdos.programmer
  4. Subject: Re: The smallest TSR contest
  5. Message-ID: <BtyMyr.Lt2@ireq.hydro.qc.ca>
  6. Date: 2 Sep 92 16:54:26 GMT
  7. References: <AJcrvcgSo6@rkb.riga.lv> <BtrpHu.FoB@ireq.hydro.qc.ca> <9224402.5239@mulga.cs.mu.OZ.AU>
  8. Sender: news@ireq.hydro.qc.ca (Netnews Admin)
  9. Organization: Institut de recherche d'Hydro-Quebec, Varennes, Canada
  10. Lines: 49
  11.  
  12. In article <9224402.5239@mulga.cs.mu.OZ.AU> fjh@munta.cs.mu.OZ.AU (Fergus James HENDERSON) writes:
  13. >beaurega@ireq.hydro.qc.ca (Denis Beauregard) writes:
  14. >
  15. >[...]
  16. >>One advantage of Pascal over C is that the Pascal is
  17. >>embedded in the code and C is not (C must call standard library while
  18. >>standard Pascal can expend more directly some statements like the
  19. >>print (Fortran do the same).  
  20. >
  21. >This is not true.
  22. >
  23. >A C compiler may well expand calls to standard functions, like
  24. >    printf("%s\n",s);
  25. >with equivalent but more efficient code, eg.
  26. >    puts(s);
  27. >Indeed such compilers do exist, although they are not common.
  28. >
  29. >See the recent discussion on comp.lang.fortran.
  30. >
  31. >-- 
  32. >Fergus Henderson             fjh@munta.cs.mu.OZ.AU      
  33. >This .signature virus is a self-referential statement that is true - but 
  34. >you will only be able to consistently believe it if you copy it to your own
  35. >.signature file!
  36.  
  37. I doubt this is "standard C" compiler.  The reason is that in C
  38. you can redefine all functions.  Changing printf for puts means that
  39. printf definition is frozen.
  40.  
  41. To remain standard, nobody should redefine the standard functions (i.e.
  42. alter printf meaning), but the possibility exists.
  43.  
  44. Anyway, since this will improve the result of compilation, we have
  45. to accept the existence of such not-standard process (or is it standard with
  46. the inclusion of standard function names?).  
  47.  
  48. Final point, you talk about discussions about Fortran.  Fortran, like Pascal,
  49. has reserved keywords that eases optimization, while C has a very small
  50. number of reserved keywords.  If Borland wants to import optimization
  51. a la Pascal in the C compiler to improve the product, we may also
  52. expect the standard of C to evoluate (just like the Fortran 90 is a step
  53. over Fortran 77 and Fortran 66) since Borland has the largest number of
  54. C programmers in its marketshare.
  55.  
  56. -- 
  57.   \_\    Denis Beauregard  *  internet:beaurega@ireq.hydro.qc.ca
  58.  /   \   Genealogiste officiel : Beauregard/Jarret/Jarest/Vincent
  59. J   __>  Un Quebec renouvele dans une Amerique renovee
  60. \_.-===                                                  Opinions ? Et pis non !
  61.