Sign In | Subscribe

Enter your Sign on user name and password.

Forgot password?
  • Follow us on:
Start learning today, and be successful in your academic & professional career. Start Today!
Loading video...
This is a quick preview of the lesson. For full access, please Log In or Sign up.
For more information, please see full course syllabus of Visual Basic
  • Discussion

  • Study Guides

  • Table of Contents

Lecture Comments (4)

1 answer

Last reply by: John Snape
Wed Dec 17, 2014 6:47 PM

Post by joseph pulliam on November 15, 2014

I have a question. When writing in Visual Studio Express 2012? There is no console. I am trying to figure out how to write a program for determining price per pounds with weight in ounces and pounds.

1 answer

Last reply by: John Snape
Mon Jul 28, 2014 2:19 PM

Post by Jean Uwumuremyi on July 26, 2014

Anybody else having problems opening the exercise files?

Declaring Variables

  • Dim stands for Dimension, you are telling VB how big of space to set aside for your variable (the dimensions of the variable space)
  • Value types hold their data directly
  • Reference types only hold a pointer to the actual data somewhere else in memory
  • All built-in numeric types are value types
  • Use a data type with enough precision for the work you need to do
  • {Enter Data Type Information}
  • {Enter Variable Naming Information}
  • Numeric variables default to 0 (zero)
  • String variable default to an empty string
  • Objects are initialized to Nothing (null)
  • Constants never change during the program execution
  • Constants can be any data type
  • Usually all uppercase so they are easily seen when scanning code
  • Implicit conversions are always allowed for widening conversions (where the source data type is less precise than the destination data type)
  • Explicit conversions are for narrowing conversions
  • Null means "never entered"
  • Use ? after the variable name in the Dimension statement
  • Boolean is a "Yes or No"/"True or False" type variable
  • False always converts to/from zero
  • Although discouraged, you can use a reserved word for a variable name by always surrounding it with brackets [ ]