Are zero and null perfect synonyms?
'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.
-
5If you are a programmer, "null" could mean zero but could not mean void.– mmyersSep 17, 2010 at 15:21
-
4Programming questions should go on stackoverflow.com– deleteSep 17, 2010 at 15:22
-
11
-
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.– pkaedingSep 17, 2010 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?– pkaedingSep 17, 2010 at 17:54
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.
-
Isn't "null" used in phone numbers and floors, levels, etc... Nov 24, 2010 at 15:45
-
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 :-)– psmearsFeb 13, 2011 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? Sep 20, 2010 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. Sep 20, 2010 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. Sep 20, 2010 at 18:49
-
@Mr. Shiny and New: You never know. A lot of check processing is automated these days. Sep 22, 2010 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. :) Sep 22, 2010 at 19:48
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.
-
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. Sep 20, 2010 at 18:08
-
@David Thornley: www2.research.att.com/~bs/bs_faq2.html#null seems to say null is zero, or close enough for this conversation. Sep 20, 2010 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.
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.
"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.
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
"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?"
(void *)0
(i.e. a null pointer).