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


Groups > comp.lang.c > #127675

Re: Copy array with small changes

From Spiros Bousbouras <spibou@gmail.com>
Newsgroups comp.lang.c
Subject Re: Copy array with small changes
Message-ID <yGKPbffYFeMoGJSzhGBV3DOSSxOrb@bongo-ra.co> (permalink)
References (1 earlier) <qShpC.133290$Zg.23093@fx21.am4> <SJspC.109257$qj4.65637@fx37.am4> <NvupC.120298$856.70911@fx42.am4> <66acb9ef-62ec-4e2b-8d2a-0a93a9e3192f@googlegroups.com> <pywpC.111248$CL3.107353@fx17.am4>
Organization virginmedia.com
Date 2018-03-12 15:14 +0000

Show all headers | View raw


On Mon, 12 Mar 2018 14:56:23 +0000
bartc <bc@freeuk.com> wrote:
> On 12/03/2018 14:47, mark.bluemel@gmail.com wrote:
> > On Monday, 12 March 2018 12:37:11 UTC, Spiros Bousbouras  wrote:
> >> On Mon, 12 Mar 2018 10:35:32 +0000
> >> bartc <bc@freeuk.com> wrote:
> >>> On 11/03/2018 22:13, Spiros Bousbouras wrote:
> > 
> >>>> Actually something like  arrsz  is a better name than  n.
> >>>
> >>> No, this suggests array size which in C usually means byte-size, not
> >>> number of elements.
> >>
> >> You have any statistics to back this up ? I always use it to mean number
> >> of elements.
> > 
> > It means byte-size to 100% of 'bartc' which is the important thing.
> 
> So referring to the length of the array as its size, even though 
> throughout the language 'sizeof(array)' refers to its byte-size not its 
> length, is not going to be confusing at all.

It had never occurred to me to look at it this way but I see your point.

> OK....
> 
> (What would the parameter be named if it /was/ intended to be its 
> byte-size?)

I don't know , I've never had a need to give a name to a variable or
parameter to express an array size in bytes. I only use size in bytes
when I use it as an argument to  malloc()  or  realloc() ; in all other
situations , I deal with number of elements.

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


Thread

Copy array with small changes Noob <root@127.0.0.1> - 2018-03-11 22:51 +0100
  Re: Copy array with small changes supercat@casperkitty.com - 2018-03-11 15:11 -0700
  Re: Copy array with small changes Richard Damon <Richard@Damon-Family.org> - 2018-03-11 18:12 -0400
    Re: Copy array with small changes Spiros Bousbouras <spibou@gmail.com> - 2018-03-11 22:35 +0000
      Re: Copy array with small changes Richard Damon <Richard@Damon-Family.org> - 2018-03-13 13:10 -0400
  Re: Copy array with small changes Spiros Bousbouras <spibou@gmail.com> - 2018-03-11 22:13 +0000
    Re: Copy array with small changes Spiros Bousbouras <spibou@gmail.com> - 2018-03-12 00:04 +0000
    Re: Copy array with small changes bartc <bc@freeuk.com> - 2018-03-12 10:35 +0000
      Re: Copy array with small changes Spiros Bousbouras <spibou@gmail.com> - 2018-03-12 12:37 +0000
        Re: Copy array with small changes bartc <bc@freeuk.com> - 2018-03-12 13:10 +0000
        Re: Copy array with small changes Jorgen Grahn <grahn+nntp@snipabacken.se> - 2018-03-12 13:34 +0000
          Re: Copy array with small changes Tim Rentsch <txr@alumni.caltech.edu> - 2018-03-17 09:22 -0700
        Re: Copy array with small changes mark.bluemel@gmail.com - 2018-03-12 07:47 -0700
          Re: Copy array with small changes bartc <bc@freeuk.com> - 2018-03-12 14:56 +0000
            Re: Copy array with small changes Spiros Bousbouras <spibou@gmail.com> - 2018-03-12 15:14 +0000
            Re: Copy array with small changes mark.bluemel@gmail.com - 2018-03-12 08:53 -0700
        Re: Copy array with small changes Keith Thompson <kst-u@mib.org> - 2018-03-12 09:08 -0700
          Re: Copy array with small changes supercat@casperkitty.com - 2018-03-12 09:57 -0700
            Re: Copy array with small changes Richard Damon <Richard@Damon-Family.org> - 2018-03-13 13:21 -0400
    Re: Copy array with small changes Noob <root@127.0.0.1> - 2018-03-12 15:25 +0100
      Re: Copy array with small changes Spiros Bousbouras <spibou@gmail.com> - 2018-03-12 15:09 +0000
  Re: Copy array with small changes Jorgen Grahn <grahn+nntp@snipabacken.se> - 2018-03-12 06:59 +0000
    Re: Copy array with small changes Noob <root@127.0.0.1> - 2018-03-12 15:55 +0100
      Re: Copy array with small changes bartc <bc@freeuk.com> - 2018-03-12 15:07 +0000
      Re: Copy array with small changes mark.bluemel@gmail.com - 2018-03-12 09:03 -0700
      Re: Copy array with small changes Ben Bacarisse <ben.usenet@bsb.me.uk> - 2018-03-12 17:42 +0000
        Re: Copy array with small changes Noob <root@127.0.0.1> - 2018-03-12 23:33 +0100
          Re: Copy array with small changes Wouter Verhelst <w@uter.be> - 2018-03-12 23:44 +0100
          Re: Copy array with small changes Tim Rentsch <txr@alumni.caltech.edu> - 2018-03-17 09:48 -0700
            Re: Copy array with small changes Steven Petruzzellis <frelwizzen@gmail.com> - 2018-03-18 03:31 -0700
            Re: Copy array with small changes Noob <root@127.0.0.1> - 2018-03-22 17:10 +0100
        Re: Copy array with small changes Tim Rentsch <txr@alumni.caltech.edu> - 2018-03-17 09:24 -0700
          Re: Copy array with small changes Ben Bacarisse <ben.usenet@bsb.me.uk> - 2018-03-17 18:04 +0000
            Re: Copy array with small changes Tim Rentsch <txr@alumni.caltech.edu> - 2018-03-26 22:55 -0700
              Re: Copy array with small changes Ben Bacarisse <ben.usenet@bsb.me.uk> - 2018-03-27 15:28 +0100
                Re: Copy array with small changes Steven Petruzzellis <frelwizzen@gmail.com> - 2018-03-28 14:42 -0700
      Re: Copy array with small changes Jorgen Grahn <grahn+nntp@snipabacken.se> - 2018-03-13 12:46 +0000
  Re: Copy array with small changes Anton Shepelev <anton.txt@gmail.com> - 2018-03-12 22:36 +0300
  Re: Copy array with small changes Wouter Verhelst <w@uter.be> - 2018-03-12 23:32 +0100
    Re: Copy array with small changes Wouter Verhelst <w@uter.be> - 2018-03-13 10:42 +0100
    Re: Copy array with small changes Noob <root@127.0.0.1> - 2018-03-13 11:37 +0100
      Re: Copy array with small changes Wouter Verhelst <w@uter.be> - 2018-03-13 21:27 +0100
  Re: Copy array with small changes Tim Rentsch <txr@alumni.caltech.edu> - 2018-03-17 09:55 -0700

csiph-web