2.0K views

Uploaded by jbushman

Attribution Non-Commercial (BY-NC)

- Desktop Guide
- Flash MX 2004 and Video
- Dream Weaver Cascading Style Sheets
- Javascript Material
- Javascript Guide
- Advanced Dream Weaver Forms and Databases
- Visual Basic - The Message Box
- Visual Basic 6 Variables
- Free Download Java Script Tutorials
- Macro Media - Flash MX 2004 Getting Started With Flash
- Blackberry Application Tutorial
- Javascript Book
- Build a Better Website 2010
- Blueprint CSS framework version 0.9.1 cheat sheet
- Javascript Codes
- Css
- Web Technologies Unit-II
- gameloop_tute
- Data Tutorials
- SQL Server 2005 Basics

You are on page 1of 15

Immediate-Command

Window

• Enables

you to type

mathematic

al

calculations

to solve.

Print 20 + 50 + 10

80

Variables as Integer or

Single

• Integer • Single

• Represents whole • Represents

numbers between floating-point

-32,768 and value – numerical

32,767. value that has a

• Ex. 240, -128, 2, decimal portion.

etc. • Ex. 12.75,

235.7584

Integer

Long Integer

• A number that doesn’t fit into the

integer range

• Range of –2,147,483,648 to

2,147,483,647.

Floating-Point Numbers

• Single-Precision • Double-Precision

• Accurate down to • Accurate down to

six decimal places 14 decimal places

• Ex. 34.875637 • Ex.

657.364971122357

638

More Data Types

• Variant • Currency

• Can contain almost • Floating-Point type

any type of data –

default data type of number

• Leaves VB to figure • Range of –

out how to store the 92233720368547

data. 7.5808 to

• Use up more memory, 92233720368547

slowing down the

7

program, ex:

Dim value1

Dim value2 As Variant

Mixing Data Types

totalValue = quantity * price

• Price is floating-point number,

while quantity is integer.

• Data type will be to the left of the

equals sign. totalValue is a Single

type, so the result of the

multiplication will be a single-

precision floating-point number

Equals sign (=)

• Doesn’t always mean equals

• Actually means “takes the value

of”

• Example:

• totalNumTapes = totalNumTapes +

quantity

Arithmetic Operators

Operator Name Use

+ Addition Sum values

Integer Division (\)

• Using backslash character (\) will

always give you an integer – drops

the decimal point.

• Ex. 12\5 results in 2, rather than 2.4

Mod operator

• Also performs division, only gives

remainder of the division

• Ex. 4 goes into 14 three times with

a remainder of 2, so the operation

14 Mod 4 yields a result of 2.

• Won’t be used a lot

Exponentiation Operator

(*)

• Used to raise numbers to a power –

multiplies the number times itself

based on the exponent.

• Ex. 10^2 is the same as 10 * 10,

which equals 100.

Order of Operations

1. Exponentiation (^)

2. Multiplication (*), Division (/), Integer

Division (\) and Modulus (Mod)

3. Addition (+) and Subtraction (-)

• Operations of same precedence are

evaluated from left to right.

• Ex. 3 * 5 / 2 = 7.5

Order of Precedence

• Can be changed by using

parentheses

• Ex. totalValue = totalValue + price *

quantity

• To: totalValue = (totalValue + price) *

quantity

parentheses is performed first.

Have a good day!!

- Desktop GuideUploaded bysidneyelagib
- Flash MX 2004 and VideoUploaded byapi-3841107
- Dream Weaver Cascading Style SheetsUploaded bydanielle leigh
- Javascript MaterialUploaded byhardy161087
- Javascript GuideUploaded byHarsha_Vardhan_1274
- Advanced Dream Weaver Forms and DatabasesUploaded bydanielle leigh
- Visual Basic - The Message BoxUploaded byhanamsaleh
- Visual Basic 6 VariablesUploaded byz0r00zh
- Free Download Java Script TutorialsUploaded bycowox
- Macro Media - Flash MX 2004 Getting Started With FlashUploaded bysweetaslux
- Blackberry Application TutorialUploaded byferaz
- Javascript BookUploaded byhassan_nlab
- Build a Better Website 2010Uploaded bytonyja
- Blueprint CSS framework version 0.9.1 cheat sheetUploaded byGareth J M Saunders
- Javascript CodesUploaded bySami Ahmed
- CssUploaded byEmad Elsaid
- Web Technologies Unit-IIUploaded bykprasanth_mca
- gameloop_tuteUploaded byem
- Data TutorialsUploaded byRangaswamy.N.Naidu
- SQL Server 2005 BasicsUploaded bymeeraneela0808
- HTML-css TagsUploaded bySami Ahmed
- Web Technologies Unit-IUploaded bykprasanth_mca
- Web Technologies Unit-VUploaded bykprasanth_mca
- Java Threads TutorialUploaded byNani Angirekula's
- FireworksMXTutorialUploaded bydanielle leigh
- Web Technologies Unit-IIIUploaded bykprasanth_mca
- Visual BasicUploaded bykvsureshmysore
- Java Application Development for Blackberry Smart PhoneUploaded bywahyusumartha
- CSS Cheat SheetUploaded byesommer

- base 2.docxUploaded byNik Norhafiza
- 33rd Inmo 2018 Exam SolutionsUploaded byqwert
- Solution to PuzzleUploaded byamanpunia
- Vedic MathematicsUploaded byM Basanna
- Rods for Multiplication and DivisionUploaded byAlejandro Moncrieff
- Semi - Detailed LPUploaded byPrincess
- Fractional and Law of IndicesUploaded byMazlin Lin
- Understanding AlgebraUploaded byΑνεστιος Ερημος
- Quantitative Aptitude.pdfUploaded bysathwik edupuganti
- NumbersUploaded byOmer Ali
- The Legal Basis of Math-1Uploaded byhartati
- 2015 F1 Math Chap 2 NotesUploaded byPatrick Phuah
- Agarwal a K - An Analogue of Euler's Identity and New rial Properties of N-Colour Composition - ppUploaded byRenee Bravo
- winter-camp.pdfUploaded byDestroyer74
- 1.Number Systems Question and AnswerUploaded bykeerthanasubramani
- Wandering in the World of Smarandache Numbers, by A. A. K. MajumdarUploaded byAnonymous 0U9j6BLllB
- f9827b6430547fd3f2c94fabf299fb97-original.pdfUploaded bykjel reida jøssan
- Class Notes Subtracting IntegersUploaded bymswalsh
- Sieve of EratosthenesUploaded byOdair Sanches
- Majozi ExpansionsUploaded byahmed tohami
- Computer Architecture 3rd Edition by Moris ManoCh 10.pptUploaded bySadaf Rasheed
- Number Theory for GMAT.docUploaded bySaif Ullah
- Volume Kerja Mata PelajaranUploaded byMar Akmal Jusoh
- DeleteUploaded byqwerty
- Std06 Maths EMUploaded byrajini
- CM105.18to19Uploaded byapi-3849444
- SEQUENCES OF INTEGERS, CONJECTURES AND NEW ARITHMETICAL TOOLSUploaded byMia Amalia
- CP_CS02_BasicMathForPhysicsUploaded byabseaz
- Arithmetic Glossary TermsUploaded bynorfina
- MoessnerUploaded byCharlie Pinedo