what does the DIM mean in this code? I understand everything else.

1. Display “Salary Average” as program title
2. Prompt user for employee names
3. Prompt user for employee salary
4. Convert average salary
5. Count salaries above average salary
6. Count salaries below average salary
7. Post final results

EmpName (string:EmpName)
EmpSalary (integer:EmpSalary)

Main Module
Call EmpName Module
Select Case
Case Done = No
Display “Please Enter Employee Name”
DIM Employee Name as EmpName
If EmpName is “” Then
Display “Please Re-Enter Employee Name”
Call EmpSalary Module
Display “Please enter “EmpName”’s Salary”
If EmpSalary < 0 Then
Display “Please Re-Enter “EmpName”’s Salary”
Case Done = Yes
Call Average Salary Module
Call Salaries Above Module
Call Salaries Below Module
Display “Thank You!!!”
End Main Module

EmpName Module
Display “Please enter employee name”
Input Employee Name
End EmpName Module

EmpSalary Module
Display “Please Enter EmpName’s Salary”
Input EmpSalary
End EmpSalary Module

Average Salary Module
Sum EmpSalary
DIM EmpName = 1
Count EmpName
Average Salary = Sum EmpSalary/Sum EmpName
End Average Salary Module

Salaries Above Module
If Salary > Average Salary Then Count
End Salaries Above Module

Salaries Below Module
If Salary < Average Salary Then Count
End Salaries Below Module

3 Years
Discussion Span
Last Post by Learner010

dim statement is used to decalre one or more variables in vb.
one suggestion :
Never use of space in Identifiers.Its against the naming rules.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.