Word Document Properties


Chapter 4: Storing and Modifying Information



Download 8,82 Mb.
Pdf ko'rish
bet88/207
Sana16.03.2022
Hajmi8,82 Mb.
#496217
1   ...   84   85   86   87   88   89   90   91   ...   207
Bog'liq
VBA For Dummies 5th Ed.pdf ( PDFDrive )

Chapter 4: Storing and Modifying Information
09_046500 ch04.qxp 12/5/06 5:54 PM Page 91


and the position of 
To
within the string is 10, for a total of 7 characters. The 7
characters include the word 
String
and the space that follows, which is the
reason for using the 
Trim
function.
Using numbers for calculations
Numbers form the basis for a lot of the information computers store. You
use numbers to perform tasks in a spreadsheet, to express quantities in a
database, and to show the current page in a document. Programs also use
numbers to count things such as loops, to determine the position of items
such as characters in a string, and to check the truth value of a statement.
Finally, VBA uses numbers in myriad ways, such as determining which 
character to display onscreen or how to interact with your code.
Understanding the numeric types
You look at numbers as a single entity — a number is simply a number. The
computer views numbers in several different ways. The reason for this diver-
sity of viewpoints is that the processor actually works with different kinds of
numbers in different places: one for integer values (those without a decimal
point) and another for floating-point values (those with a decimal point). At
one time, the math coprocessor that was used to work with money and num-
bers with decimal points was a separate chip within the computer. Today a
single processor performs both integer and floating-point (real) number cal-
culations. The four basic number types include
Integer:
This is a number without a decimal. An 
integer
can hold any
whole number, such as 5, but not a number with a decimal, such as 5.0.
Although these two numbers are the same, the first is an integer, and the
second isn’t.
Real:

real
number is one that contains a decimal point. The decimal
portion doesn’t have to contain a value. The number 5.0 is a perfectly
acceptable real number. A real number is stored in a completely differ-
ent format than an integer. (The storage technique only matters to the
processor — you don’t need to know it to use VBA.)
Currency:
Financial calculations usually require special accuracy. Even
a small error can cause problems. The 
currency
numeric type stores
numbers with extreme precision but at an equally large cost in both 
processing time and memory use.
Decimal:
Computers normally store information by using a base 2, or
binary, format. You use a base 10, or decimal, format for working with
numbers. Small errors can occur when converting from one numbering
system to the other and accumulate to create huge errors. The 
decimal
numeric system stores numbers in a simulated base 10 format, which
eliminates many computing errors. However, this system requires more
memory and processing time than any other numeric type.
92

Download 8,82 Mb.

Do'stlaringiz bilan baham:
1   ...   84   85   86   87   88   89   90   91   ...   207




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©hozir.org 2024
ma'muriyatiga murojaat qiling

kiriting | ro'yxatdan o'tish
    Bosh sahifa
юртда тантана
Боғда битган
Бугун юртда
Эшитганлар жилманглар
Эшитмадим деманглар
битган бодомлар
Yangiariq tumani
qitish marakazi
Raqamli texnologiyalar
ilishida muhokamadan
tasdiqqa tavsiya
tavsiya etilgan
iqtisodiyot kafedrasi
steiermarkischen landesregierung
asarlaringizni yuboring
o'zingizning asarlaringizni
Iltimos faqat
faqat o'zingizning
steierm rkischen
landesregierung fachabteilung
rkischen landesregierung
hamshira loyihasi
loyihasi mavsum
faolyatining oqibatlari
asosiy adabiyotlar
fakulteti ahborot
ahborot havfsizligi
havfsizligi kafedrasi
fanidan bo’yicha
fakulteti iqtisodiyot
boshqaruv fakulteti
chiqarishda boshqaruv
ishlab chiqarishda
iqtisodiyot fakultet
multiservis tarmoqlari
fanidan asosiy
Uzbek fanidan
mavzulari potok
asosidagi multiservis
'aliyyil a'ziym
billahil 'aliyyil
illaa billahil
quvvata illaa
falah' deganida
Kompyuter savodxonligi
bo’yicha mustaqil
'alal falah'
Hayya 'alal
'alas soloh
Hayya 'alas
mavsum boyicha


yuklab olish