Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.c > #139334

Re: [Solved] Need some help getting to my feet

From Keith Thompson <kst-u@mib.org>
Newsgroups comp.lang.c
Subject Re: [Solved] Need some help getting to my feet
Date 2019-01-01 12:49 -0800
Organization None to speak of
Message-ID <lntvisksqz.fsf@kst-u.example.com> (permalink)
References (9 earlier) <20181226190200.579c2b3b60053c907d8c80d3@g{oogle}mail.com> <gzwWD.177487$le.59699@fx14.iad> <RZwWD.201178$%55.76713@fx10.am4> <slrn3s3kq2nf0p.iod.ike@iceland.freeshell.org> <g91vueFt63lU1@mid.individual.net>

Show all headers | View raw


rbowman <bowman@montana.com> writes:
> On 01/01/2019 12:14 PM, Ike Naar wrote:
>> On 2018-12-31, Bart <bc@freeuk.com> wrote:
>>> There are quite a few issues with having declarations scattered
>>> anywhere, such as having to locate the declaration for name (which will
>>> involve scanning every line backwards to the top of a function).
>>
>> Often those declarations are not "scatterd anywhere", they are
>> just a few lines above the point where the name is used so
>> there is no need to scroll back to the top of the function.
>
> At times when I'm modifying existing code I will put the new 
> declarations in the block where they are used. It's a signal to future 
> maintenance programmers that the block wasn't original functionality and 
> was added for some reason. We use Subversion so they can easily do 'svn 
> blame' to find the bug reference.

I don't see how that signals that the code was added later.  Why wouldn't
it have been written that way in the first place?

-- 
Keith Thompson (The_Other_Keith) kst@mib.org  <http://www.ghoti.net/~kst>
Will write code for food.
"We must do something.  This is something.  Therefore, we must do this."
    -- Antony Jay and Jonathan Lynn, "Yes Minister"

Back to comp.lang.c | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Re: [Solved] Need some help getting to my feet Jorgen Grahn <grahn+nntp@snipabacken.se> - 2018-05-04 13:31 +0000
  Re: [Solved] Need some help getting to my feet luser droog <luser.droog@gmail.com> - 2018-05-04 17:19 -0700
  Re: [Solved] Need some help getting to my feet Tim Rentsch <txr@alumni.caltech.edu> - 2018-05-18 21:55 -0700
    Re: [Solved] Need some help getting to my feet already5chosen@yahoo.com - 2018-05-21 03:26 -0700
      Re: [Solved] Need some help getting to my feet Tim Rentsch <txr@alumni.caltech.edu> - 2018-06-14 03:00 -0700
        Mixing declarations and statements in C code (Was: [Solved] Need some help getting to my feet) gazelle@shell.xmission.com (Kenny McCormack) - 2018-12-26 06:43 +0000
      Re: [Solved] Need some help getting to my feet Anton Shepelev <anton.txt@g{oogle}mail.com> - 2018-12-26 19:02 +0300
        Re: [Solved] Need some help getting to my feet Jorgen Grahn <grahn+nntp@snipabacken.se> - 2018-12-31 18:01 +0000
        Re: [Solved] Need some help getting to my feet Richard Damon <Richard@Damon-Family.org> - 2018-12-31 17:16 -0500
          Re: [Solved] Need some help getting to my feet Bart <bc@freeuk.com> - 2018-12-31 22:44 +0000
            Re: [Solved] Need some help getting to my feet Ike Naar <ike@iceland.freeshell.org> - 2019-01-01 19:14 +0000
              Re: [Solved] Need some help getting to my feet rbowman <bowman@montana.com> - 2019-01-01 13:14 -0700
                Re: [Solved] Need some help getting to my feet Keith Thompson <kst-u@mib.org> - 2019-01-01 12:49 -0800
                Re: [Solved] Need some help getting to my feet rbowman <bowman@montana.com> - 2019-01-01 15:55 -0700
                Re: [Solved] Need some help getting to my feet Keith Thompson <kst-u@mib.org> - 2019-01-01 16:05 -0800
                Re: [Solved] Need some help getting to my feet rbowman <bowman@montana.com> - 2019-01-01 22:17 -0700
              Re: [Solved] Need some help getting to my feet Bart <bc@freeuk.com> - 2019-01-01 20:25 +0000

csiph-web