Welcome
Welcome to raptorflowchart

You are currently viewing our boards as a guest, which gives you limited access to view most discussions and access our other features. By joining our free community, you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content, and access many other special features. In addition, registered members also see less advertisements. Registration is fast, simple, and absolutely free, so please, join our community today!

Employee Check-in Terminal program

Discuss and share code here. Working on something that you can't get right - post it here.

Employee Check-in Terminal program

Postby doug098765 » Wed Nov 16, 2011 12:27 pm

I am trying to create an employee check-in terminal that accepts an employee id number and validates it by comparing it to an id and name in an array. I am about 90% completed with it but I am having trouble with the process for when an invalid id number is entered. The arrays need to be set to hold 20 sets of data for future expansion but for my assignment I only need to use 5 pieces of test data. If a valid id is entered the corresponding name and id are displayed and then the program asks for the next id to be entered...this part works correctly. When an invalid id is entered the program is supposed to display the invalid id and a message saying that there is an error due to the unknown employee id that was entered and then loop back to the input phase to get another id. When I enter an invalid id I get an error in Raptor saying the employee id array doesn't have 21 elements and the program stops. I will attach a copy of the raptor file if any one has time to look at it...it's due today but I have a feeling I will be turning this one in late. Any help with this would be greatly appreciated.
Chap9prog.rap
Raptor file
(52.65 KiB) Downloaded 116 times
doug098765
 
Posts: 5
Joined: Tue Nov 15, 2011 9:03 pm

 

Re: Employee Check-in Terminal program

Postby dfcox » Wed Nov 16, 2011 7:42 pm

In the validate_employee sub you enter the loop that checks ID then increments sub by one but you don't check to see how large sub has gotten. In the conditional "Employee_id_number=employee_id_array[sub]" you could change it to "employee_id_number=employee_id_array[sub] or sub > 5"
dfcox
Site Admin
 
Posts: 203
Joined: Wed Jun 30, 2010 1:32 pm

Re: Employee Check-in Terminal program

Postby doug098765 » Wed Nov 16, 2011 9:39 pm

thank you...I am getting pretty close to completing this.
doug098765
 
Posts: 5
Joined: Tue Nov 15, 2011 9:03 pm


Return to RAPTOR programming discussions

Who is online

Users browsing this forum: No registered users and 0 guests

suspicion-preferred