errno, etymology thereof

Discussion in 'C++' started by unspammable@gmail.com, Mar 3, 2005.

  1. Guest

    How did the errno variable get its name?
    I always figured it's short for "error number", but then it would have
    been better to call it errnum... no?

    (Come to think of it, this is probably a C question, so my apologies if
    it is indeed offtopic)
     
    , Mar 3, 2005
    #1
    1. Advertising

  2. <> wrote in message
    news:...
    > How did the errno variable get its name?


    Maybe somebody from Bell Labs who was there a
    few decades ago when C and the Unix system calls
    were invented will answer this. Otherwise, some
    mind reading appears to be called for.

    There have been systems where variable names were
    constrained to fit in as few as 6 characters. And many
    people are adverse to abbreviations other than well
    known ones. (If they were adverse to abbreviations
    on 6-character systems, they had a very hard time.)
    So, to me, 'errno' is the least surprising name, given
    its function and the fact that mixed case was not in
    favor among the crowd that devised those names,
    at least not at that time. (Remember, this was when
    the "glass teletype" was a newfangled thing and many
    output devices did not display lower case at all.)

    > I always figured it's short for "error number", but then it would have
    > been better to call it errnum... no?


    'No' is a commonly used abbreviation for 'number',
    so better is certainly not clear.

    > (Come to think of it, this is probably a C question, so my apologies if
    > it is indeed offtopic)


    I believe errno is mentioned in the C++ standard
    since it is part of standard C (or ex-standard C)
    by reference and errno is well covered there.

    --
    --Larry Brasfield
    email:
    Above views may belong only to me.
     
    Larry Brasfield, Mar 3, 2005
    #2
    1. Advertising

  3. wrote:
    > How did the errno variable get its name?
    > I always figured it's short for "error number", but then it would have
    > been better to call it errnum... no?
    >
    > (Come to think of it, this is probably a C question, so my apologies if
    > it is indeed offtopic)



    I suppose, because no is a complete word (abbreviation), while nu is not.




    --
    Ioannis Vranos

    http://www23.brinkster.com/noicys
     
    Ioannis Vranos, Mar 3, 2005
    #3
  4. Ron Natalie Guest

    wrote:
    > How did the errno variable get its name?
    > I always figured it's short for "error number", but then it would have
    > been better to call it errnum... no?
    >
    > (Come to think of it, this is probably a C question, so my apologies if
    > it is indeed offtopic)
    >


    "no" is a pretty common abbreviation for "number"

    You have to realize that globals in UNIX/C in those days had a limit
    on seven significant characters (because the linker only did eight and
    all the C global symbols had a leading underscore prepended to them).
     
    Ron Natalie, Mar 4, 2005
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?dmJNZW50YWw=?=

    Remote debugging with asp.net (or lack thereof)

    =?Utf-8?B?dmJNZW50YWw=?=, Jan 3, 2005, in forum: ASP .Net
    Replies:
    3
    Views:
    515
    Daniel Fisher\(lennybacon\)
    Jan 4, 2005
  2. Steve Sobol
    Replies:
    10
    Views:
    973
    Steve Sobol
    Sep 3, 2004
  3. viza

    &errno, sizeof errno

    viza, Sep 12, 2008, in forum: C Programming
    Replies:
    20
    Views:
    1,016
    Tim Rentsch
    Sep 14, 2008
  4. Glenn Linderman

    errno 22 instead of errno 2

    Glenn Linderman, Jan 28, 2009, in forum: Python
    Replies:
    0
    Views:
    372
    Glenn Linderman
    Jan 28, 2009
  5. Daniel
    Replies:
    20
    Views:
    733
    James Kanze
    Jul 8, 2010
Loading...

Share This Page