
Ross Sheppard High School
Computer Programming 20
Student Learning Guide
The Variables Program
| When you have finished this project, you will be able to: | |
| declare a variable | |
| describe different types of variable | |
| use a variable | |
|
describe the following terms:
|

|
The Variables Program
|
|
Object |
Property |
Setting |
|
Form |
Name |
frmVariables |
|
Caption |
The Variables Program |
|
|
TextBox |
Name |
txtAnswer |
|
Text |
Make it blank |
|
|
Font |
Ms Sans Serif Bold 18pt |
|
|
TextBox |
Name |
txtNum1 |
|
Text |
Make it blank |
|
|
Font |
Ms Sans Serif Bold 18pt |
|
|
TextBox |
Name |
txtNum2 |
|
Text |
Make it blank |
|
|
Font |
Ms Sans Serif Bold 18pt |
|
|
Label |
Name |
lblSign |
|
Caption |
+ |
|
|
Font |
Ms Sans Serif Bold 18pt |
|
|
Alignment |
2- Center |
|
|
CommandButton |
Name |
btnSumIt |
|
Caption |
Sum It! |
|
|
Font |
Your choice |
|
|
CommandButton |
Name |
btnExit |
|
Caption |
Exit |
|
|
Font |
Your choice |






Where:Dim varName As Datatype
|
Variable Type |
Code |
Example |
|
Integer |
Whole numbers |
Integer to hold a person's age |
|
Long |
Whole numbers |
Long number to count the population of Canada |
|
Single |
Decimal |
Decimal point number to answer a math problem |
|
Double |
Decima to 12 digits of accuracy |
Double to record salaries |
|
Boolean |
True/False statements |
Boolean as in if you pass this course or not |
|
String |
Text Data |
String to hold your name |


