errno, etymology thereof

G

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)
 
L

Larry Brasfield

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.
 
I

Ioannis Vranos

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.
 
R

Ron Natalie

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).
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,733
Messages
2,569,439
Members
44,829
Latest member
PIXThurman

Latest Threads

Top