1,105,633 Community Members

psuedo help!

Member Avatar
Newbie Poster
3 posts since Dec 2013
Reputation Points: 0 [?]
Q&As Helped to Solve: 0 [?]
Skill Endorsements: 0 [?]

I was wondering what DIM means in psuedocode? I ran across this in my research and I can understand everything except for the DIM and it would help a lot if someone else could let me know what this means. I am working on the simple array process and having trouble. Here it is:

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

Member Avatar
Master Poster
765 posts since Jun 2006
Reputation Points: 88 [?]
Q&As Helped to Solve: 149 [?]
Skill Endorsements: 7 [?]

DIM is the keyword used in Visual Basic to declare a variable.

VB: Dim varname As Object
C#: object varname;

Member Avatar
Industrious Poster
4,006 posts since Mar 2010
Reputation Points: 513 [?]
Q&As Helped to Solve: 504 [?]
Skill Endorsements: 87 [?]

Actually, for this pseudo code (pseudo code is NOT standardized), I think it is the dimension of an array. IE, the C code for DIM EmpName = 1 would likely be const char* EmpName[1];

Since I don't have your professor's definition to be sure, this would be my best guess.

This article has been dead for over three months: Start a new discussion instead
Start New Discussion
View similar articles that have also been tagged: