Unformatted text preview: Programming Programming Environments and Translation Methods
Fundamentals for Users
R: 4507 Outline
Language type used in this class 2. Language translation approaches 3. Error types 4. Error finding methods
1. 2 1. Language used in this Class Visual Basic for Applications (VBA) – Scripting Language for MS Excel – Creates EventDriven programs (Scripts) Attach code to Objects
– E.g., button Application triggered by events – Interpreted – Interpreter installed with MS Excel
3 – E.g., Button click Why Translate? Convenient highlevel languages Machines run machinelevel language Requires translation Traditional compilers are specific to CPU – Source code programs – Script language statements type (architecture) 4 2. There are Three Fundamental Translation Approaches Compiler Interpreter TwoStep Approach 5 Compiler Compiler translates highlevel program to machinelevel program. – Translate once, run many – Outcome: machine language instructions in the form of .EXE and .DLLs – Fast because machine runs machine code and doesn’t have to translate at run time. – Must install machinelevel program on user’s machine before program runs
6 Interpreter Interpreter converts code to machine language statementbystatement just before execution. Discards commands when they are no longer needed Translation done every time Slower because it must translate for every use
7 Translation Methods Comparison 2Level Highlevel Compiler Mostly translated JVM or CLR Machine level Classic Compiled Highlevel Compiler Machine level Interpreted Script Interpreter Machine level 8 Translation Methods
Type Classic Compiled Interpreted 2Level Examples How Pascal, C+ Whole Program + HTML, statementby Java Script, statement VBA Java, Whole Program; Visual then statementby Basic.Net statement 9 Java: 2Level Approach
13 13 3. Types of Errors Syntax Error Runtime Error – Incorrect use of language’s defined set of key terms and operators – Compiler or interpreter usually catches – Found when running – Logic errors – Compiler typically doesn’t catch
14 14 4. Methods for Error Detection Visual Code Examination Debugger Stepthrough Test Cases – Developed independently of program – Known correct input/output combinations 15 15 ...
View Full Document
This note was uploaded on 04/07/2011 for the course ISYS 200 taught by Professor Dean during the Winter '11 term at BYU.
- Winter '11