Feb 28, Programming in VB – Part 1

Feb 28, Programming in VB – Part 1 -...

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

View Full Document Right Arrow Icon
Programming in VB – Part 1 28/02/2008 10:56:00 VB Programming VB is a programming language for windows application Use it to: o Run our algorithms on a computer Use the computer as the computer agent o Assist us in making more effective use of Excel To provide a suitable user interface in our worksheets To express complex logic in formulas Creating an algorithm can be difficult o Think through the problem and solve it without using a computer However, with an algorithm, writing the program becomes easy o Translate the instruction in the algorithm to VB instructions Problems encountered in developing an algorithm o Comprehension problems o Process problems Problems encountered in a VB program o Syntax errors o Semantic errors (logic errors) o Run time errors (fails when running)
Background image of page 1

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

View Full DocumentRight Arrow Icon
Translating the Algorithm Description When a program is executing, the instructions and data being processed are  stored in RAM The following parts of the Algorithm Description tell us what data is to be  stored and processed by out program o Givens o Intermediates o Results Each data item can be either a variable or a constant Variable o Is an address in RAM that has a name and contains a value  o The value can change as the code is executed o Can hold only one value at a time Constant o Has a value that does not change as the code is executed o A meaningful name is used in place of a value Names o Begin with a letter o Max of 255 characters in length o Contain only letter, numbers and  _ (underscore) o Cannot be a VB reserved word We tell the VB translator what type of data is to be processed by our program  by defining data types o Each type determines
Background image of page 2
The kind of data which can be stored in RAM The range of possible values How many bytes of RAM will be sued to store it The type of operations that can be performed on the data The VB tanslator can then o Determine how and where to store that data in RAM o Tell us if we try to do something silly in our program
Background image of page 3

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

View Full DocumentRight Arrow Icon
Image of page 4
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 12/08/2009 for the course TEFLER ADM1300 taught by Professor Koppel during the Fall '09 term at University of Ottawa.

Page1 / 12

Feb 28, Programming in VB – Part 1 -...

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

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