473,387 Members | 1,678 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

errno, etymology thereof

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)

Jul 23 '05 #1
3 1418
<un*********@gmail.com> wrote in message
news:11**********************@l41g2000cwc.googlegr oups.com...
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: do***********************@hotmail.com
Above views may belong only to me.
Jul 23 '05 #2
un*********@gmail.com 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
Jul 23 '05 #3
un*********@gmail.com 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).
Jul 23 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Richard Tobin | last post by:
In a library I am writing, I want to use an errno-like mechanism for error returns. The error would probably be represented as a struct rather than just an integer. I don't have any...
3
by: Mac | last post by:
Is it legal to declare errno after you've included errno.h? For example: #include<errno.h> .... int main (void) {
3
by: RoSsIaCrIiLoIA | last post by:
On Wed, 05 May 2004, CBFalconer <cbfalconer@yahoo.com> wrote: >Even if sscanf succeeds in inputting various fields, there are >probably range and other validity checks to be applied. The...
4
by: Paul Emmons | last post by:
If I am writing a function that sets errno according to a possible error condition, should it also set errno to 0 if it executes normally, or should it leave errno alone on success?
11
by: Vijay Kumar R Zanvar | last post by:
> In <pan.2004.04.22.04.06.05.969827@bar.net> "Mac" <foo@bar.net> writes: > > >Is it legal to declare errno after you've included errno.h? > > > >For example: > > > >#include<errno.h> > > >...
18
by: pete | last post by:
On my system, the following five expressions are true: (HUGE_VAL == HUGE_VAL / 2) (1 / HUGE_VAL == 0) (sqrt(HUGE_VAL) == HUGE_VAL) (sqrt(-1) == HUGE_VAL) (sqrt(-HUGE_VAL) == HUGE_VAL) and
5
by: Urs Beeli | last post by:
I have a question regarding errno. If I understand it correctly, including <errno.h> allows me to check "errno" for error values that some standard library functions may set. This brings up some...
13
by: Spiros Bousbouras | last post by:
Assume I'm writing a function which is going to set the value of errno if something went wrong but I also want to guarantee that errno will remain unchanged if the function completed its task...
22
by: viza | last post by:
Hi all, A quick one - since errno is a lvalue, can I do: fread( & errno, sizeof errno, 1, fp ) ? TIA viza
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.