Here is the error message the program says just after executing to completion:
1. " Argument not specified for parameter 'category' of 'Public Sub employCat(ByRef testScore As Integer, ByRef category As String)'. "
2. " Argument not specified for parameter 'testScore' of 'Public Sub employCat(ByRef testScore As Integer, ByRef category As String)'. "
3. " Argument not specified for parameter 'category' of 'Public Sub displayInfo(ByRef category As String, ByRef interview As String)'. "
4. " Argument not specified for parameter 'interview' of 'Public Sub displayInfo(ByRef category As String, ByRef interview As String)'. "
I am building a program that uses modules.
Here is the Source Code of which I am speaking of:
Module Module 1
Sub Main()
Dim testScore As Integer = 0
Dim category As String = " "
Dim interview As String = " "
getScore(testScore)
employCat()
displayInfo()
End Sub
Sub getScore(ByRef testScore As Integer)
Console.WriteLine("Please enter your test score.")
testScore = console.ReadLine()
End Sub
Sub employCat(ByRef testScore As Integer, ByRef category As String)
If testScore < 60 Then
category = "No"
Else
If testScore is < 70 Then
category = "Maybe"
Else
If testScore is < 85 Then
category = "Likely"
Else
If testScore is > 85 Then
category = "Definite"
Else
End If
End If
End If
End If
End Sub
Sub displayInfo(ByRef category As String, ByRef interview As String)
If category = "Definite" Then
interview = "Yes"
Else
If category = "Likely" Then
interview = "Yes"
Else
If category = "Maybe" Then
interview = "Yes"
Else
If category = "No" Then
interview = "No"
Else
End If
End If
End If
End If
If interview = "Yes" Then
Console.WriteLine("CONGRATULATIONS!!! Based on your test score, you have been selected for an interview at DataDyne International! Good Luck!")
Else
Console.WriteLine("I am sorry but your test score is not high enough to allow you an interview at DataDyne International. Better luck next time...")
End If
End Sub
End Module
Thats it for the source code. I am just barely learning how to pass variables by either reference or value so if you have to explain something to me about this then keep in mind that I havent gotten through the basics to using visual basic yet. Too much
information and I am bound to not understand what you are saying. Thank you and I look forward to getting help to solve this issue. Thanks!
None
0 Points
1 Post
Ive got a problem with my code. Please help!! Using Visual Studio 2010.
Jan 30, 2014 01:36 PM|Techy-Jessi|LINK
Here is the error message the program says just after executing to completion:
1. " Argument not specified for parameter 'category' of 'Public Sub employCat(ByRef testScore As Integer, ByRef category As String)'. "
2. " Argument not specified for parameter 'testScore' of 'Public Sub employCat(ByRef testScore As Integer, ByRef category As String)'. "
3. " Argument not specified for parameter 'category' of 'Public Sub displayInfo(ByRef category As String, ByRef interview As String)'. "
4. " Argument not specified for parameter 'interview' of 'Public Sub displayInfo(ByRef category As String, ByRef interview As String)'. "
I am building a program that uses modules.
Here is the Source Code of which I am speaking of:
Module Module 1
Sub Main()
Dim testScore As Integer = 0
Dim category As String = " "
Dim interview As String = " "
getScore(testScore)
employCat()
displayInfo()
End Sub
Sub getScore(ByRef testScore As Integer)
Console.WriteLine("Please enter your test score.")
testScore = console.ReadLine()
End Sub
Sub employCat(ByRef testScore As Integer, ByRef category As String)
If testScore < 60 Then
category = "No"
Else
If testScore is < 70 Then
category = "Maybe"
Else
If testScore is < 85 Then
category = "Likely"
Else
If testScore is > 85 Then
category = "Definite"
Else
End If
End If
End If
End If
End Sub
Sub displayInfo(ByRef category As String, ByRef interview As String)
If category = "Definite" Then
interview = "Yes"
Else
If category = "Likely" Then
interview = "Yes"
Else
If category = "Maybe" Then
interview = "Yes"
Else
If category = "No" Then
interview = "No"
Else
End If
End If
End If
End If
If interview = "Yes" Then
Console.WriteLine("CONGRATULATIONS!!! Based on your test score, you have been selected for an interview at DataDyne International! Good Luck!")
Else
Console.WriteLine("I am sorry but your test score is not high enough to allow you an interview at DataDyne International. Better luck next time...")
End If
End Sub
End Module
Thats it for the source code. I am just barely learning how to pass variables by either reference or value so if you have to explain something to me about this then keep in mind that I havent gotten through the basics to using visual basic yet. Too much information and I am bound to not understand what you are saying. Thank you and I look forward to getting help to solve this issue. Thanks!
Sincerely,
^_^ Techy.jessi ^_^
programming VisualStudio2010 visualbasic SourceCode
All-Star
52813 Points
15767 Posts
Re: Ive got a problem with my code. Please help!! Using Visual Studio 2010.
Jan 30, 2014 01:41 PM|oned_gk|LINK
programming VisualStudio2010 visualbasic SourceCode
Suwandi - Non Graduate Programmer