LESSON 8: VARIABLES AND CONSTANT Flashcards
introduced flowcharts in 1921.
Frank Gilberth
Flowcharts are called ______ at the beginning.
Process Flow Charts
define the visual appearance and behavior of flowchart symbols themselves
Symbol properties
represent the data or information flowing through the flowchart
Data properties
This symbol is used to mark the start and the end of the list of instructions. Start is used to mark the starting point and the End
is of the line flowchart.
Terminal Block
This shows the direction of the flowchart
Flow lines
The parallelogram symbol is used for input and output instruction. For input the instruction that can be used is Read or Input, followed by a list of variables separated by comma. For output the
instruction that can be used is Display or Print, followed by a list of variables and or
text that will be displayed or printed.
Input/Output Block
This symbol is used to process
calculations. Formulas are usually entered in this section of the flowchart. Formulas include variables that will be replaced by figures entered by the user. Activities that are be performed are also included.
Processing Block
A diamond shaped symbol used to indicate decisions. Done in question form and is answerable by yes or no. Uses logical relations such as equal, not equal, greater than, greater than equal, less than and less than equal.
Decision Block
Flowcharts are written from top to button, left to right. Once the bottom of the left side is reached continuation of the flowchart can be at the right side of the same page.
On-Page Connector
This symbol is used if the flowchart is to be continued on the next page.
Off Page Connector
- This variable type holds a value of true or false.
- Internally these are actually stored as the numbers 1 and 0 representing true and false respectively.
-Boolean values are used in conditional statements to decide whether particular parts of Visual Basic code should be executed ore not.
Visual Basic Boolean variable
Rules when naming the variables in Visual Basic
2012
- It must be less than 255 characters
- No spacing is allowed
- It must not begin with a number
- Period is not permitted
- This variable type holds a single character (such as the letter “B”).
- The value of a Char can be any character.
- Internally, a number in the range of 0 to 65,553 is used to represent the character value as defined by
the ASCII table.
Char variable
- This variable type holds a positive number in the range 0 to 255.
- Due to limited range, byte variable should be used with caution.
- An attempt to assign a negative value or a value greater than 255 to a Visual Basic Byte variable will
result in an error.
Byte variable
- This variable type holds a date and time value.
- Dates are declared in the form #mm/dd/yyyy#. For example, May 23,2007 would be declared as
#5/23/2007#. - Visual Basic provides a number of mechanisms for working with Date variables (such as calculating a
date six months from today’s date).
Visual Basic Date variable
- This variable type can store either a whole number or a decimal number up to 29 decimal places.
- When working with whole numbers, however, it is recommended that the Integer variable type be
used as this is more memory efficient than the Decimal variable type.
Decimal variable
- This variable type is used to store either very large numbers, or small numbers requiring more than 28
decimal places. - To be precise, it can store positive integers in the range 4.9406564581246544E-324 to-4.94065645841246544E-324.
- Double variables are typically used when developing scientific applications using visual basic and, as such, are generally not used by the average developer.
Visual Basic Double variable
- This variable type is used to store whole numbers between-2,147,483,648 and 2,147,483,648.
- The integer variable cannot be used to store numbers containing decimals.
Visual Basic Integer variable
- It is a catch-all variable type which can be used to store a value of any data type.
- Due to its flexibility it reserves more memory than most variable types.
- For this reason, it is more efficient to use the correct variable type for the value you need to store
rather than use the Object variable type.
Object variable
This variable type is used to store whole numbers ranging from -9,233,372,036,854,775,808 to
9,233,372,036,854,775,807.
Visual Basic Long variable
This variable type is used to store whole numbers ranging from -32,768 to 32,767.
Short variable
- This variable type stores multiple characters that make up words or sentences.
- String variables are encapsulated in double-quotation marks (“). For example “Hello, this is a test”.
String variable
When you declare a variable in a procedure, the variable is called
Procedure-Level Variable.