Chapter 3 w Variables, constants, and calculations DIM statements - declaration temporary memory...
-
Upload
rosamund-carr -
Category
Documents
-
view
216 -
download
0
Transcript of Chapter 3 w Variables, constants, and calculations DIM statements - declaration temporary memory...
Chapter 3
Variables, constants, and calculations• DIM statements - declaration• temporary memory locations• identifier, data type, scope• data types - values
• string, integer, currency
• naming rules - conventions
• Constants • named - define with CONST - name, data type, and
value– numbers or strings
• intrinsic - VB built in– vbRed - predefined
• declaring variables• scope of variables - lifetime
• global - all procedures
• module - all procedures in form
• local - within procedure
Calculations - numbers only• change text to number - VAL function
Arithmetic operations• order of operations, precedence• * / before + -• parentheses alter order
Formatting data - look• formatting function• values not used in calculations
Counting and Accumulating Sums• module-level variable
option explicit - forced to declare variables
#6 - P.E. 3.2 – pg. 119 design (name everything), print code, form, form as text, general and module comments, print one example of output; declare every variable (option explicit); val function for input text boxes; constant for the 10% fee – use in formula; format output correctly
#7 - pg. 163 - review questions 1-15