Dim FirstName As String
Dim number1 As Integer
Dim - Short for Dimension.
number1 - name of the variable
As Integer - We're telling Visual Basic that the variable is going to be a number (integer)
Dim testNumber As Short
And it's As Short that is causing us the problems. If you use As Short you're only allowed numbers up to a certain value. The range for a Short variable is -32 768 to 32 767. When we entered 6 numbers, Visual Basic decided it didn't want to know. If you run your programme again, and then enter 32768, you'll get the same Overflow error message. If you change it once more to -32769, you'll get the error message as well. So it's not just 6 numbers a Short Type can't handle - it's 5 numbers above or below the values specified.
short - 12345 - 5 digits - The range for a Short variable is -32 768 to 32 767.
Dim testNumber As Integer
If you started at 1 and added the numbers in sequence, you should have been allowed to enter 1234567890. One more number and Visual Basic gave you the Overflow error message, right? That's because variable types with As Integer also have a limitation. The range you can use with the As Integer variable type is -2,147,483,648 to 2,147,483,647. If you want a really, really big number you can use As Long.Dim testNumber As Long
Floating Point Numbers
3 types:
Dim testNumber As Single
Dim testNumber As Double
Dim testNumber As Decimal
Single and Double mean Single-Precision and Double-Precision numbers. If you want to do scientific calculations, and you need to be really precise, then use Double rather than Single: it's more accurate.
The As Decimal Type is useful when you want a precise number of decimal places. It's not as accurate as the Double Type, though.
n terms of the space used in the computer's memory, Short Types use 2 Bytes, Integer Types use 4 Bytes, Long Types use 8 Bytes, Single Types use 4 Bytes, Double Types use 8 Bytes, and Decimal Types use 16 Bytes.
Tuesday, March 30, 2010
The name .net
Actually, .NET is many things, but primarily it's a marketing term for a set of products and technologies that Microsoft is creating to move personal and enterprise computing beyond the PC desktop and into a distributed Internet-based environment. So .NET--which was originally called Next Generation Windows Services (NGWS)--is also a platform, one that Microsoft sees as the successor to Windows.
.NET is natural for Microsoft marketing to emphasis on the "Network"-ing aspect of its technologies and reacted to the marketing blitz by Sun Micro System in the late 1990 where the theme was "Network is the computer". The term "Dot-Com" was synonymous with the Internet that time, and "Dot-NET" was a play to that word.
On 15 March 1985 the first Internet dot.com domain name was registered by Symbolics Inc., a computer systems firm in Cambridge, Massachusetts.
.NET is natural for Microsoft marketing to emphasis on the "Network"-ing aspect of its technologies and reacted to the marketing blitz by Sun Micro System in the late 1990 where the theme was "Network is the computer". The term "Dot-Com" was synonymous with the Internet that time, and "Dot-NET" was a play to that word.
On 15 March 1985 the first Internet dot.com domain name was registered by Symbolics Inc., a computer systems firm in Cambridge, Massachusetts.
A domain name is a component of a Uniform Resource Locator (URL) used to access web sites, for example:
- URL: http://www.example.net/index.html
- Top-level domain name: .net
- Second-level domain name: example.net
- Host name: www.example.net
Subscribe to:
Posts (Atom)