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