home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / lang / c / 19303 < prev    next >
Encoding:
Text File  |  1993-01-06  |  1.3 KB  |  38 lines

  1. Path: sparky!uunet!spool.mu.edu!umn.edu!cybrspc!roy
  2. From: roy%cybrspc@cs.umn.edu (Roy M. Silvernail)
  3. Newsgroups: comp.lang.c
  4. Subject: Re: Problem with string processing.
  5. Message-ID: <wVRXwB3w165w@cybrspc.uucp>
  6. Date: Tue, 05 Jan 93 21:36:43 CST
  7. References: <1993Jan5.161120.1423@leland.Stanford.EDU>
  8. Organization: Villa CyberSpace, Minneapolis, MN
  9. Lines: 27
  10.  
  11. dkeisen@leland.Stanford.EDU (Dave Eisen) writes:
  12.  
  13. > >Roy M. Silvernail (roy%cybrspc@cs.umn.edu) writes:
  14. > >
  15. > >| Assuming a large enough string for the append, and low-high byte ordering,
  16. > >| would this work?
  17. > >|
  18. > >| strcat(str,(char *)&ch);
  19. > I think Roy was being cute here.
  20.  
  21. <blush>
  22.  
  23. > So Roy's trick, if I am understanding him correctly, will work
  24. > fine on a system where a number of assumptions are correct. I'll
  25. > let Roy defend the usage of his trick from those who would 
  26. > argue it is not good style.
  27.  
  28. Defend it?  Dave, I didn't even know if it would work... :)
  29.  
  30. Thanks for a very thorough explanation (which I deleted to save a few
  31. bytes).  I don't think I'll be using this one too often.
  32. --
  33.     Roy M. Silvernail   | #include <stdio.h>                 | "press to test"
  34.  roy%cybrspc@cs.umn.edu | main(){                            |     <click>
  35.  cybrspc!roy@cs.umn.edu |  float x=1;                        | "release
  36.                         |  printf("Just my $%.2f.\n",x/50);} |    to detonate"
  37.