home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / alt / folklore / computer / 16618 < prev    next >
Encoding:
Internet Message Format  |  1992-11-22  |  1.6 KB

  1. Path: sparky!uunet!munnari.oz.au!yoyo.aarnet.edu.au!news.adelaide.edu.au!news.adelaide.edu.au!usenet
  2. From: phil@iagu.itd.adelaide.edu.au (Phil Kernick)
  3. Newsgroups: alt.folklore.computers
  4. Subject: Re: command abbreviation
  5. Date: 23 Nov 1992 00:16:25 GMT
  6. Organization: Psychology Department, University of Adelaide
  7. Lines: 35
  8. Distribution: world
  9. Message-ID: <1ep7spINN364@huon.itd.adelaide.edu.au>
  10. References: <1992Nov13.190208.17876@cubic.com> <1ei49vINNr2c@uniwa.uwa.edu.au>
  11. Reply-To: phil@adam.adelaide.edu.au
  12. NNTP-Posting-Host: iagu.itd.adelaide.edu.au
  13.  
  14. In article <1ei49vINNr2c@uniwa.uwa.edu.au>, john@gu.uwa.edu.au (John West) writes:
  15. > Zilog got it right (LoaD dest,src)
  16. > Motorola got it right (MOVE src,dest)
  17. > Intel got it wrong (MOVe dest,src)
  18. > You can have the operands either way around, but *please*, at least get the
  19. > name right. strcpy should be src,dest (copy THIS to THAT).
  20.  
  21. But you need to realise *why* strcpy is there.
  22.  
  23.   strcpy(t, s)
  24.  
  25. is semantically equal in other languages to:
  26.  
  27.   t := s;
  28.  
  29. That is, it is an assignment, and as such it should have its operands in the
  30. same order as an assignment.  Since strings in C are not a primative type,
  31. but the assignment operator is still a requirement, strcpy is necessary.
  32. Now I grant you it might have been better to call is strassign...
  33.  
  34. > Oh dear. Is this called a religious issue?
  35.  
  36. Yep.
  37.  
  38.  
  39.  
  40. Regards,
  41. Phil.
  42.  
  43. --
  44.    _-_|\    Phil Kernick                        "Sleep all day,
  45.   /     \   University of Adelaide               Party all night,
  46.   \_.-*_/   E-Mail: phil@adam.adelaide.edu.au    It's fun to be a
  47.        v    Phone:  +61 8 228 5914               Vampire!"
  48.