Visualbasic Lecture5 PDF
Visualbasic Lecture5 PDF
Declaring Variables
As is a keyword
length = 112
6nteger types
-yte
$hort
6nteger
1ong
7loating#8oint types
$ingle
Double
Decimal
-oolean
!har
$tring
Date
!hapter "# $lide 9
Copyright 2011 Pearson Addison-Wesley
)umber $ystem
De%imal
'inary
Decimal A %B%<2C<B%<"C<B%<(C<B%<%C%B%<<
A %<<<< C < C < C < C % A %<<<%
-inaryA %B(2C<B("C<B((C<B(%C%B(<
A %9 C < C < C < C % A %=
!hapter "# $lide >
8osition: 2 " ( % <
Value: % < < < %
Copyright 2011 Pearson Addison-Wesley
)umber $ystem (cont@)
Dnsigned
%B(=C%B(9C%B(5C%B(2C%B("C%B((C%B(%C%B(
<
A %(> C 92 C "( C %9 C > C 2 C ( C %A (55
$igned
#%B(=C%B(9C%B(5C%B(2C%B("C%B((C%B(%C%B(<
A #%(> C 92 C "( C %9 C > C 2 C ( C %A #%
!hapter "# $lide ?
8osition: = 9 5 2 " ( % <
Value: % % % % % % % %
Copyright 2011 Pearson Addison-Wesley
)umber $ystem (cont@)
)umber *ange
Dnsigned
< to ((n #%), n A number of bits
6f n A >, range is
& t 2(( )2* +1=2((,
$igned
#(n#% to C((n#% #%), n A number of bits
6f n A >, range is
+12* )2-=12*, t .12- )2- +1=12-,
!hapter "# $lide
%<
Copyright 2011 Pearson Addison-Wesley
6nteger Data Types
Date data type variables can hold the date and time
or both