Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watmath!clyde!rutgers!seismo!sundc!hadron!inco!mack From: mack@inco.UUCP Newsgroups: comp.lang.c Subject: Re: static variables Message-ID: <190@inco.UUCP> Date: Sat, 6-Jun-87 15:30:06 EDT Article-I.D.: inco.190 Posted: Sat Jun 6 15:30:06 1987 Date-Received: Sun, 7-Jun-87 08:39:37 EDT References: <7653@brl-adm.ARPA> <4064@amd.UUCP> <183@inco.UUCP> <4077@amd.UUCP> Organization: McDonnell Douglas-INCO, McLean, VA Lines: 39 Summary: On reading carefully In article <4077@amd.UUCP>, markg@amd.UUCP (Mark Gorlinsky) writes: [stuff omitted] > You are comparing apples to oranges or is that pointers to strings. > > Re-read the the orginial article. > > One question was, "Are character strings local to a function static??" > The answer is YES!!! If you're not sure why, read K&R pg 80. > > The other question asked, "is some_string static?", is NO. > > Read carefully. Thank you. > > -- > Mark Gorlinsky - AMD Processor Products Division/APPS SQA My apologies, Mark. I thought the second question (and attendant code) was an attempt to clarify the initial question. Of course a literal string is static, although not in the same sense that a static variable is. As for reading carefully, I did. I just didn't interpret the question the same way you did. The code I posted was an attempt to illustrate my point, and I don't think I was incorrect. I agree that you and I (and the original poster) were talking apples vs. oranges. Perhaps if your reply had made clear that you thought two different questions were being asked, and if you had answered both, I wouldn't have bothered posting a miniflame. -- ------------------------------------------------------------------------------ Dave Mack (from Mack's Bedroom :<) McDonnell Douglas-Inco, Inc. DISCLAIMER: The opinions expressed 8201 Greensboro Drive are my own and in no way reflect the McLean, VA 22102 views of McDonnell Douglas or its (703)883-3911 subsidiaries. ...!seismo!sundc!hadron!inco!mack ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++