VB NOTES PART 3

VB NOTES PART 3 - destructive)---implicit conversion: can...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
2/1 Variables ---Variable: a named area in memory used to store and manipulate data. Must be declared and typed (give it a type) Dim cartons As Integer (Also have size, value) cartons 0 Declarethis variable name type Some data types: Integer Double floating-point Short Decimal Long Different operators for different types Later, we will define our own data type ----Memory Dim cartons As Integer=12 Cartons=12 Destructive operation (replaces the previous value) Dim items As Integer=5 Dim results As Integer=items*cartons (multiplication is non-
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: destructive)---implicit conversion: can change from one data type to another without saying change it. Dim intcost As Integer Dim dblcost As Double Dblcost=3.57 Intcost=dblcost 4 VB does rounding-----operators • Binary + \---------integer division -mod---------remainder of an integer division * ^---------exponentiation / 7.0/3.0=3.33333 7\3=2 7 mod 3=1 • Unary-(negative) is overloaded + (positive) • Precedence Anything in parentheses () Exponents, left to right Unary + - *, / \ Mod +,-...
View Full Document

This note was uploaded on 12/01/2011 for the course 6K 226 taught by Professor Staff during the Fall '10 term at University of Iowa.

Page1 / 2

VB NOTES PART 3 - destructive)---implicit conversion: can...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online