

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!


Types of Programming Languages Procedural- instructions, step-by-step Object-oriented- uses objects to specify solution Event-driven- program flow is determined by user actions Types of Programming Errors and remedies Syntax errors- errors in vocab or punct. That prevent the code from compiling Result errors- caused by a logic error, produces an incorrect result Runtime errors- an error in code when program runs, program must be restarted Legal names for variables and constants in VBA VBA syntax for declaring variables and constants Character data uses double quotes, everything else does not Causes and remedies for various types of programming errors Syntax- error in programming entry; use compiler to locate each error Result- error in logic (incorrect parenthesis placement); test it Runtime- unanticipated problem when running; test the program using it like an ignorant user would. VBA data types for variables and constants Variables- byte, integer, long, single, double, currency, character, string, date, time, date and time combined, Boolean, object Constants- tax rate, discount rate VBA syntax for assigning values to variables and constants Value on the right, variable on the left. VBA syntax for declaring arrays and accessing a single item of an array Declare by stating identifier (name), size (if static), and data type. 2. Reference the position. Fine points of modular program design and types of programming modules
Module coupling and cohesion Coupling- the degree to which a module is dependent on another module. Cohesion- Functional cohesion- instructions support one task. Temporal cohesion- instructions are time-related. Procedural cohesion- high level instructions denoted by the sequence they occur. Module inputs and outputs CHAPTER 10 Types of program modules Two approaches to identifying program modules Understand general concept of cohesion and coupling Understand how modules can communicate with each other One module will only pass data to another module that needs it by means of local variables. CHAPTER 13 Explanation of WITH block A WITH block is used frequently in VBA macro syntax when multiple properties of the same object are set and/or multiple methods are invoked. CHAPTER 14 The application of variables and constants in VBA To declare variables in VBA use the keyword “Dim” followed by the variable identifier and its data type. To declare a constant in VBA use the keyword “Const” followed by the identifier, data type and initial value. Debugging tools on pg. 459 Locals window- displays all local variable types and values as the code executes. Good for logic errors and data type mismatches Immediate window- displays printed output from the program code. Useful for providing feedback from the code as it executes. Watch window- displays selected proj. variables from any module, etc. whose values can be monitored any time the project is in break mode. Used to cause a program to go into break mode when its value changes. Breakpoint- allows the user to set a point in the program of code for it to stop. Line-by-line-code execution- 1. Step Into- each time the toolbar icon is pressed, the next line of code executes. When other modules are called, it steps into those also line-by-line. 2. Step Over- like step into unless the call is to another module, in that case it executes the other module without stepping into it. 3. Step Out- executes remaining functions without stopping. Ch. 11 Reading Quizzes