-
Apr 10th, 2015, 03:02 PM
#1
Thread Starter
New Member
Dim numbers ?
Hello vbforums. I've been making string cipher/encoders for quite some time but i've never had to dim a number. Does anyone know how i can do that ?
What im trying to do:
What error im getting:
Code:
"Identifier expected."
// Andreas Digmann
-
Apr 10th, 2015, 03:06 PM
#2
Re: Dim numbers ?
In Visual Basic.Net, in order to declare a variable it must start with either an underscore or a letter followed by letters, numbers, and underscores(or nothing else if it starts with a letter).
Something else, if you're declaring a number then you should set the data type as a numeric data type such as an Integer, Double, Decimal, Short, etc. rather than a String because a String basically represents Text. So change your code to something like this:
Code:
Dim _1 as Integer = 1
'Or
Dim one As Integer = 1
Edit - Here is a list of data types offered in VB.Net: https://msdn.microsoft.com/en-us/library/47zceaw7.aspx
-
Apr 10th, 2015, 03:20 PM
#3
Thread Starter
New Member
Re: Dim numbers ?
Thanks 'dday9' - Hope it will work, hahaha i tried to whipe the bug off my screen.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|