# Register now to access 7 million high quality study materials (What's Course Hero?) Course Hero is the premier provider of high quality online educational resources. With millions of study documents, online tutors, digital flashcards and free courseware, Course Hero is helping students learn more efficiently and effectively. Whether you're interested in exploring new subjects or mastering key topics for your next exam, Course Hero has the tools you need to achieve your goals.

19 Pages

### Lecture_11

Course: ITFN 1301, Fall 2009
School: Clayton
Rating:

Word Count: 555

#### Document Preview

Scope, Variables, and Parameters in VB Motivation We already know the concept of variables and constants in Pseudocode. Let's extend that to VB We've already seen the dim statement, so let's formalize this construct Built-In Types to VB Numeric Integer &amp; Long (whole numbers) Single &amp; Double (decimal numbers) String Fixed &amp; variable length Boolean Others Variant Object Currency...

Register Now

#### Unformatted Document Excerpt

Coursehero >> Georgia >> Clayton >> ITFN 1301

Course Hero has millions of student submitted documents similar to the one
below including study guides, practice problems, reference materials, practice exams, textbook help and tutor support.

Course Hero has millions of student submitted documents similar to the one below including study guides, practice problems, reference materials, practice exams, textbook help and tutor support.
Scope, Variables, and Parameters in VB Motivation We already know the concept of variables and constants in Pseudocode. Let's extend that to VB We've already seen the dim statement, so let's formalize this construct Built-In Types to VB Numeric Integer & Long (whole numbers) Single & Double (decimal numbers) String Fixed & variable length Boolean Others Variant Object Currency Date Choosing Variable Types Technically, everything could be variant and we could depend upon the VB interpreter to deal with types This is inefficient Rule of thumb (same as Pseudocode) Choose the type which allows you do to what you need to do Choose the "smallest" data type that meets your needs Variable Naming Variable identifiers must Begin with an alphabetic character ('a', 'b', 'z') Cannot contain spaces Can't contain special characters (%, &, !, #, @, or \$) Must be unique within the scope of their use Hungarian (Prefix) Notation Boolean Byte Currency Date Double Integer Long Object Single String Variant bln byt cur dt dbl int lng depends upon object sng str AllthankstoMicrosoftsChief var ArchitectDr.CharlesSimonyi Option Explicit By default, VB can automatically use variables without them having been defined This is bad practice because it lends itself to errors To enforce strict variable declaration before use: option explicit (default settable under Tools | Options | Editor | Require Variable Declaration) Declaring Variables Use the dim statement dim VARIABLE_IDENTIFIER as TYPE Examples: dim intAge as Integer dim strName as String dim curSalary as Currency Variant Rears It's Evil Intent to Rule the World What are the types of the following variables as declared below? dim intAge, intSSN as Integer Variable Scope Similar to Pseudo-code: Visible only within the scope in which it was declared You can Declare variables inside of procedure a Declare variables in the "General Declarations" section of a form/module Declare variables visible to the entire project (public) Public vs. Private Within a form module, you can define procedures & variables These can be visible to all procedures within the form module (private) They can also be declared to be visible to all other form modules (public) Public/Private VARIABLE_IDENTIFIER as TYPE Static vs. Non-static Variables Normally, a variable declared within a procedure "lives" only as long as that procedure is active If we want persistence between procedure calls, we use the static keyword when defining our variables static VARIABLE_IDENTIFIER as TYPE More on this later Constants Declared similarly to variables, but their values don't change Const CONST_IDENTIFIER as TYPE = VALUE Example: Const PI as Double = 3.1415 Event Procedures We've seen these already! Private Sub ControlName_EventName (parameters) COMMANDS End Sub Private Sub Form_EventName (parameters) COMMANDS End Sub General Procedures These are procedures that you define yourself They can be Sub (aka P...

Find millions of documents on Course Hero - Study Guides, Lecture Notes, Reference Materials, Practice Exams and more. Course Hero has millions of course specific materials providing students with the best way to expand their education.

Below is a small sample set of documents:

UCSC - AMS - 206
column 1 below contains the number of bicycles observedcolumn 2 below contains the number of other vehicles observedcolumn 3 below contains an indication of whether the street is residential (1), fairly busy (2), or busy (3)column 4 below cont
UCSC - CMPE - 080
Homework2Consider the funnel shown below. Suppose that air at the left entrance (with area D1=0.05 m2) has pressure of 2 Pascal. If the area of the smaller end to the right is D2=0.01 m2, what is the air pressure at the smaller end? Use this scheme
Binghamton - CS - 428
Today/Last Time Hope everyone had a nice break! How was the midterm? Midterm 2 on 4/14; Final Friday 5/7 in class Last time Project Overview BGP Today Wrap up unicast routing Peering, Transit and Settlements Tunneling Virtual Private Netwo
UCSC - CMPE - 150
Spring 2006 PEMCMPE 150 Assignment #4Due May 2, 20061. A 56-kbps pure ALOHA channel is to be shared among a number of stations, each sending a 1k bit frame, on average one frame every 10 seconds. (Assume the sender can buffer frames to handle v
UCSC - CMPE - 150
Winter 2009 PEMCMPE 150 Assignment #4Due February 3rd, 20091. List for the Link Layer a. The purpose it serves and the client for these services b. Where are these services carried out? c. What are key problems that are solved by the Link Layer
UCSC - CMPE - 150
Introduction to Computer NetworksDr. Chane L. Fullmer chane@cse.ucsc.eduCMPE 150:Spring 2003UCSCcmpe1501Homework AssignmentsHomework assignment #5 Chapter two Due June 5th This ThursdaySpring 2003UCSCcmpe1502(Optional) Class
Binghamton - CS - 428
Internet Routing Read Chapters 7 &amp; 8 Routing - Process of choosing a path over which to send packets Router - A computer making such a choice Goal: &quot;. provide a virtual network that encompasses multiple physical networks and offers a connectionl
Binghamton - CS - 210
Name:CS210 Pop Quiz 21) Draw a 2-input decoder2) Draw a 2-input MUX3) From the truth table, show the corresponding Karnaugh map, mark where the rectangles are, and convert this to a simplied gate level circuit design.A 0 0 0 0 1 1 1 1B 0
UCSC - PHYS - 250
Physics 250Graduate Mathematical MethodsInstructor: Peter Young Office: ISB 212 Phone: 459-4151 E-mail: peter@physics.ucsc.edu Place: Interdisciplinary Sciences Building, 231. Time: Mondays, Wednesdays and Fridays, 9:3010:40 am. Note: Course materi
UCSC - PHYS - 115
Quantum Mechanics using Matrix MethodsIntroduction and the simple harmonic oscillatorIn this notebook we study some problems in quantum mechanics using matrix methods. We know that we can solve quantum mechanics in any complete set of basis functio
Binghamton - CS - 333
Design and Analysis of AlgorithmsHomework assignment 2Due: Thursday, February 15th in class Please include your full name on all homework assignments. Make sure that the assignments are clear and easy to evaluate. Homework is graded at the discreti
Binghamton - CS - 333
Design and Analysis of AlgorithmsHomework Assignment 4Due March 1 in class.Please include your full name and instructor's name on all homework assignments. Make sure that the assignments are clear and easy to evaluate. Homework is graded at the di
Washington - ENVH - 517
INSTITUTE OF MEDICINEREPORT BRIEF OCTOBER 2006SEAFOOD CHOICES: BALANCING BENEFITS AND RISKSSeafood is a widely available, nutrient-rich food that provides high quality protein, low in saturated fat and rich in polyunsaturated fats, and particula
Washington - IS - 460
I S 460 AssignmentsProfessor Yong TanAssignment 1Economic Feasibility You are asked to conduct a five-year (Year 0 to Year 4) economic feasibility study. Based on project schedule, you conclude that the system will not be in operation during the
Washington - IS - 460
I S 460Sample Exam 1 SolutionProfessor Yong Tan1.2.1/2I S 460Sample Exam 1 SolutionProfessor Yong Tan3.4.5.2/2
Knox College - FACULTY - 208
B +D A +APhotoreceptors Horizontal Cells? Bipolar Cells+.5 0.0 +1.5 +1 +1 -.5 +1 +1 -1 +2 +1 +2 -.5 +2 +2 -1-C ++-BCDRetinal Ganglion Cell
Binghamton - CS - 360
Microsoft Visual Studio .NET: An Integrated Windows Program Development EnvironmentUsing Microsoft Visual Studio .NET?Self-contained environment for Windows program development: creating compiling linking testing/debugging?? ?IDE that
Binghamton - CS - 360
Microsoft Visual Studio .NET: An Integrated Windows Program Development EnvironmentUsing Microsoft Visual Studio .NETSelf-contained environment for Windows program development: creating compiling linking testing/debuggingIDE that accompanies
Binghamton - CS - 360
Microsoft Visual Studio .NET: An Integrated Windows Program Development EnvironmentUsing Microsoft Visual Studio .NET Self-contained environment for Windows program development: creating compiling linking testing/debugging IDE that accompani
Binghamton - CS - 360
Microsoft Visual Studio: An Integrated Windows Program Development EnvironmentMicrosoft Visual Studio Self-contained environment for Windows program development: creating compiling linking testing/debugging IDE that accompanies Visual C+, Vi
Binghamton - CS - 360
Microsoft Visual Studio .NET: An Integrated Windows Program Development EnvironmentUsing Microsoft Visual Studio .NET?Self-contained environment for Windows program development: creating compiling linking testing/debugging?IDE that accom
Binghamton - CS - 360
Microsoft Visual Studio 2005Microsoft Visual Studio 2005: An Integrated Windows Program Development Environment Self-contained environment for Windows program development: creating compiling linking testing/debugging IDE that accompanies Vi
Binghamton - CS - 460
Binghamton University EngiNetState University of New YorkEngiNetThomas J. Watson School of Engineering and Applied ScienceWARNINGAll rights reserved. No Part of this video lecture series may be reproduced in any form or by any electronic or m
UCSC - CMPE - 080
History of Modern Computingwww.soe.ucsc.edu/classes/cmpe080h/Fall05 David Pease Computer Engineering Department Jack Baskin School of EngineeringCourse DescriptionxA history of the development of computing technologies through the latter half o
UCSC - AMS - 261
AMS 261: Probability theory with Markov chains Spring 2005Instructor: Athanasios Kottas Oce: 153A Baskin Engineering Building Phone: 459-5536, E-mail: thanos@ams.ucsc.edu Web page: http:/www.soe.ucsc.edu/classes/ams261/Spring05/ Lectures: Tue,Thu 1
UCSC - CMPS - 290
FALL 1995, Call #94184 Concrete Mathematics CIS/CE 290F (New Course) J. Yellin, x2195, yellin@cse.ucsc.eduCourse Description: Combinatorial mathematics, includingsummation methods, binomia
UCSC - CMPE - 016
CMPE 16h Honors Applied Discrete Mathematics Spring 2004Description: Honors version of course CMPE 16: an introduction to applications of discrete mathematical systems. Topics include sets, functions, relations, graphs, trees, Boolean algebra, propo
UCSC - CMPS - 101
CMPS 101 Abstract Data Types Summer 2004 Eight Week Session: June 22 August 12Description: Studies basic algorithms and their relationships to common abstract data types. Covers the notions of abstract data types and the distinction between an abst
Washington - ECON - 482
ECONOMETRIC THEORY AND PRACTICE Economics 482Spring 2008Professor Ellis Office: Condon 401c Phone: 543-6145 Email: ellis@u.washington.edu Web: http:/www.econ.washington.edu/instruction/courses/ Office Hours: Tuesday and Thursday, 7:15-8:15, and, p
Washington - ECON - 482
ECONOMETRIC THEORY AND PRACTICE Economics 482Spring 2009Professor Ellis Office: Condon 423 (via 429) Phone: 543-6145 Email: ellis@u.washington.edu Web: http:/www.econ.washington.edu/instruction/courses/ Office Hours: Tuesday and Thursday, 7:15-8:1
UCSC - CMPS - 013
What is a queue?Stacks reverse the order of items added to themLast In First Out What if we want to preserve the order in which items are added?QueuesSolution: queueFirst In First Out: items removed in the same order they're added Similar to a