Identifier expected in Visual Basic 2010

5 pts.
Tags:
Visual Basic
I have written a program for it to read a month then display how many days that month has, but it is underlining the thirty one when I label it as an integer. Any thought why? Dim January, February, March, April, May, June, July, August, September, October, November, December, Month as string.
Dim 31 30, 28 As integer
Console.WriteLine("Please enter a month")
Month = Console.ReadLine
Select Case Month
Case 31 = January, March, May, July, August, October, December
Console.WriteLine("Your month has 31 days in it")
Console.Read()
Case 30 = April, June, September, November
Console.WriteLine("Your month has 31 days in it")
Console.Read()
Case 28 = February
Console.WriteLine("Your month has 31 days in it")
Console.Read()
End Select
1

Answer Wiki

Thanks. We'll let you know when a new response is added.

You can’t have numbers-only variable names.

Discuss This Question: 1  Reply

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.
  • carlosdl
    Even if 31 was a valid identifier name, a comma would be missing after it.
    84,745 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

Thanks! We'll email you when relevant content is added and updated.

Following

Share this item with your network: