Are zero and null perfect synonyms?
9 Answers
'null' is qualitative, representing the absence of quantity. Closer to the word 'void' than the number 'zero'. Example: he reduced it to nil.
'zero' is quantitative. Example: he got zero on his exam.
- 1,631
-
5If you are a programmer, "null" could mean zero but could not mean void. – mmyers Sep 17 '10 at 15:21
-
4
-
12
-
10@mmyers I don't think a programmer would consider null and zero equivalent. Zero is a number; it is information. Null is the absence of information. – pkaeding Sep 17 '10 at 16:10
-
-
2@mmyers, true, in some languages, and according to some conventions, 0 and null are used interchangeably. I personally feel this is a dangerous practice, because if you consider them to be equivalent, then how to signify a lack of data? – pkaeding Sep 17 '10 at 17:54
-
@mmyers #typedef void NULL will certainly make NULL mean void in a programming context, so the programming analogy really isn't that useful. – ssakl Sep 17 '10 at 17:58
-
@ssakl: Yes, but #define NULL 0 is in the C++ standard library. And that's only tangentially related to the subject now, so I'll stop there. – mmyers Sep 17 '10 at 18:25
-
"in some languages...0 and null are used interchangeably" In German, the word for "zero" is "null"! It must be confusing sometimes when they are programming stuff. – Kosmonaut Sep 17 '10 at 19:06
-
to reference a popular meme… zero is when the toilet paper roll is out of toilet paper, null is when there’s no toilet paper roll at all, and void is when there’s not even a toilet paper holder in the bathroom. – chharvey Jun 01 '20 at 23:02
No, they are not the same.
In an everyday language context, 'null' can mean that something is meaningless, as in:
The agreement became null when Sam failed to fulfill his side.
In a programming/data context (though I still think this is a language question, rather than a programming question), 'null' can mean the absence of information. If you are wondering how many apples there are, 'null' means 'I don't know'. 'Zero' means that you know that there aren't any apples.
Zero always refers to a quantity.
- 1,737
-
-
1@Pierre: I've never heard it used in phone numbers ("zero" or, in the UK at least, "Oh" is used for a digit 0). In the UK the lowest floor is the "ground" floor, and in the US they avoid the issue entirely by starting counting at 1 :-) – psmears Feb 13 '11 at 12:37
Is there a difference between a cheque(check) with $0.00 and a NULL(VOID) check?
Yes.
A $0.00 cheque will put exactly $0.00 into your bank account.
A check with VOID written on it will not be processed.
The difference may be subtle, but there is a difference.
0 represents an integer in the set of all integers (called the set Z in mathematics) NULL is not an integer, and it could represent the absence of things that aren't even numbers.
A NULL and VOID Check for example.
A NULL Marriage.
A NULL Agreement
-
Would a bank actually process a $0.00 cheque? I doubt it. What would that accomplish? – Mr. Shiny and New 安宇 Sep 20 '10 at 16:20
-
1@Mr. Shiny and New: Some people have written checks for $0.00 when being dunned for arrears of $0.00, with success. – David Thornley Sep 20 '10 at 18:06
-
@David Thornley: Sure, the act of mailing the cheque might prompt a person to fix something, but I seriously doubt the cheque goes all the way to the bank whereupon it is DEPOSITED. – Mr. Shiny and New 安宇 Sep 20 '10 at 18:49
-
@Mr. Shiny and New: You never know. A lot of check processing is automated these days. – David Thornley Sep 22 '10 at 14:53
-
@David Thornley: actually the automated processing would, I think, reject $0 amounts. I know that you can't capture a $0 amount from a credit-card electronically, it just fails. But given how screwed up the chequing system is in North America..... anything is possible I suppose. :) – Mr. Shiny and New 安宇 Sep 22 '10 at 19:48
-
Any good automated system would indeed filter out amounts <= 0.0. It would also filter out negative numbers as well as likely flagging suspiciously high numbers. Because 0 is a valid integers, this has to be programmed in as a constaint. A VOID check, on the other hand, doesn't have a "value" to process and so it CAN'T be processed, even if it were allowed. – OneProton Sep 23 '10 at 16:42
null and zero are used in many contexts where they have different meanings. In math you can have a set with no items in it (a null set) or you can have a set with a zero in it ({ 0 }) which are not the same.
In programming some languages make null the same as zero (C++) but some don't (Java).
In databases a record might have a null value in one field or it might have a zero and these are not the same.
Zero is can be used to indicate a counted quantity whereas null cannot.
- 26,528
-
3Null and zero are not the same thing in C++. A null pointer is a constant integral expression yielding zero converted to a pointer type. Further discussion on Stack Overflow. – David Thornley Sep 20 '10 at 18:08
-
@David Thornley: http://www2.research.att.com/~bs/bs_faq2.html#null seems to say null is zero, or close enough for this conversation. – Mr. Shiny and New 安宇 Sep 20 '10 at 18:51
It's not just null and zero too. What about "nothing","naugt","none" etc.
Zero is usually a noun. Zero is a number. Zero can refer to the symbol "0".
Null is usually an adjective (Null set, Null argument, Null pointer, *a nullity). Null is a not a number, usually has a different symbol each time.
Programmers are forced to make these distinctions all the time (although, 'null' is often modelled as the number 0). Although it is important in programming, the distinction is more to do with logic and mathematics.
They do have quite different roles in language although I guess in a few cases they are the same.
- 840
The words have very different meanings.
In math, I can do an equation, such as subtract two numbers, and get zero. If I don't answer the question, it could be considered null. If the question were an elementary test, zero could be the correct answer, worth points, whereas not answering the question does not result in a correct answer.
So, one can indicate that a computation has been done, the other that it has not been done.
- 874
"Nula" is the word for "0" in Hungarian and other European languages.
"Null" means "void of legal force" ... that's essentially "invalid". It's an adjective, as has been mentioned.
I'm not a programmer, so maybe that's why I don't equate the two at all.
Compare "Are you Rachel?" with "Are you tired?"
- 152
"Zero" is a number, an integer between -1 and 1. It is a physical quantity representing no countable number of an object.
"Null" is a concept of irrelevance or undefined state. For example, an agreement might become "null and void" when it is no longer applicable or enforceable, or a computer data structure pointer with no instantiation associated with it might be considered "null".
The confusion comes in the representation of a computer NULL in execution. Typically, the NULL is represented as a 0 in the memory or code. But that is just a convention. It's like saying "I am Spoxjox". Well, no, I am not Spoxjox. I am represented by the "name" or "tag" or "handle" of "Spoxjox", but I am a human being, not a sequence of letters on a discussion board. Similarly, the concept of NULL might be represented by a zero (0), but it is not the same as the number zero.
- 1,946
No. Zero is a number. Zero is also a place where a mathematical function achieves an output value of zero. Null has a wide variety of uses. Here are a few:
null set - a set devoid of elements
null contract - unenforceable contract
The Java computer language uses null as a "graveyard" object that holds no value
- 1,050
- 8
- 15
(void *)0(i.e. a null pointer). – Noldorin Sep 24 '10 at 19:03