Notices
The Basement Non-Honda/Acura discussion. Content should be tasteful and "primetime" safe.

Do While Loop

Thread Tools
 
Old 10-21-2004, 06:47 PM
  #1  
ManInCamo
Old School Crew
Thread Starter
 
ManInCamo's Avatar
 
Join Date: May 2000
Posts: 5,251
Likes: 0
Received 0 Likes on 0 Posts
Default Do While Loop

Do While sr.Peek <> -1
StoreNum = sr.ReadLine
EmpID = sr.ReadLine
EmpName = sr.ReadLine
PayType = sr.ReadLine 'reads in records from text file and puts them into memory locations
PayRate = sr.ReadLine
PayCat = sr.ReadLine
Hours = sr.ReadLine
'This portion of the code figures out if the worker is fulltime or parttime
If PayCat = "F" Then
PayCatOut = "Full Time"
ElseIf PayCat = "P" Then
PayCatOut = "Part Time"
Else
PayCatOut = "Error In Code"
End If

If PayRate = 1 Then
PayRateOut = 5.5
ElseIf PayRate = 2 Then
PayRateOut = 9.99
ElseIf PayRate = 3 Then
PayRateOut = 15.25
End If


'This portion of the code converts the hour code into a usable number of hours worked
If Hours = 1 Then
HoursOut = 20
ElseIf Hours = 2 Then
HoursOut = 25
ElseIf Hours = 3 Then
HoursOut = 30
ElseIf Hours = 4 Then
HoursOut = 40
Else : HoursOut = "Error In Code"


End If


Loop
sr.Close()
End Sub



thats it all... I'm in the middle of spitting some code out, and I got bored.
Old 10-21-2004, 06:48 PM
  #2  
IluvJae
Grifball Player
 
IluvJae's Avatar
 
Join Date: Aug 2004
Location: Foundry
Posts: 27,247
Likes: 0
Received 0 Likes on 0 Posts
Default

C++ > *
Old 10-21-2004, 06:49 PM
  #3  
ManInCamo
Old School Crew
Thread Starter
 
ManInCamo's Avatar
 
Join Date: May 2000
Posts: 5,251
Likes: 0
Received 0 Likes on 0 Posts
Default

Vb
Old 10-21-2004, 06:49 PM
  #4  
RB
snitches get stitches
 
RB's Avatar
 
Join Date: May 2002
Location: Portland, OR
Posts: 49,696
Likes: 0
Received 1 Like on 1 Post
Default

werd, VB is for programming noobs
Old 10-21-2004, 06:50 PM
  #5  
ManInCamo
Old School Crew
Thread Starter
 
ManInCamo's Avatar
 
Join Date: May 2000
Posts: 5,251
Likes: 0
Received 0 Likes on 0 Posts
Default

I suck at teh programming....



I want to fly planes and blow stuff up, not program the guildance systems on the bombs
Old 10-21-2004, 11:44 PM
  #6  
azn_redneck
Live Free Or Die
 
azn_redneck's Avatar
 
Join Date: Apr 2003
Location: San Diego County
Posts: 2,388
Likes: 0
Received 1 Like on 1 Post
Default

FORTRAN > *

OK, maybe not, it's the only language I know. h:
Old 10-22-2004, 01:50 AM
  #7  
Anthony
ZOMG Pew Pew Laserbeams
 
Anthony's Avatar
 
Join Date: Jul 2002
Posts: 7,451
Likes: 0
Received 0 Likes on 0 Posts
Default

i'm learning java at the moment and

System.out.print("It Suxs!");




All times are GMT -8. The time now is 11:42 AM.