Why is it called a single in VB.net? I'm sure there is a good reason but it doesn't seem intuitive to a non formally trained programmer like me.
C programming language is a machine-independent programming language that is mainly used to create many types of applications and operating systems such as Windows, and other complicated programs such as the Oracle database, Git, Python interpreter, and games and is considered a programming foundation in the process of ...
What is C? C is a general-purpose programming language created by Dennis Ritchie at the Bell Laboratories in 1972. It is a very popular language, despite being old. C is strongly associated with UNIX, as it was developed to write the UNIX operating system.
Compared to other languages—like Java, PHP, or C#—C is a relatively simple language to learn for anyone just starting to learn computer programming because of its limited number of keywords.
In the real sense it has no meaning or full form. It was developed by Dennis Ritchie and Ken Thompson at AT&T bell Lab. First, they used to call it as B language then later they made some improvement into it and renamed it as C and its superscript as C++ which was invented by Dr.
BPAndrew's question seems to be really "why float in C# and Single in VB.NET", which noone actually answered, so here's my 2p...
The use of "float" in C# seems to be a throwback to its C/C++ heritage. "float" still maps to the System.Single type in C#, so the keyword just exists for convenience. You could just as well declare the variable as "Single" in C# the same as you do in VB.NET.
(And as stated above, naming them Single/Double actually makes more sense as they are single/double precision floating-point numbers.)
As others have said, they map to "single" and "double" precision binary floating point types. Personally I think it was a sideways step to just name System.Single
and System.Double
- why not System.Float32
and System.Float64
to match the integer types?
The reason is that both single and double are both Floating Point numbers.
single is short for Single Precision Floating Point Number (32 bits)
double is short for Double Precision Floating Point Number (64 bits)
Therefore to call a floating point number float is ambiguous.
http://en.wikipedia.org/wiki/Single_precision
http://en.wikipedia.org/wiki/Double_precision
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With