|
-
Jan 7th, 2005, 02:43 PM
#1
Thread Starter
Fanatic Member
End of statement expected? [resolved]
If i put my mouse pointer of the "somestringvalue" part it shows a tooltip that says End of Statement Expected. What does this mean?
Dim results(0,0,0) As String
Dim index As Long
redim preserve results(index,0,0) = "somestringvalue"
Last edited by nkad; Jan 8th, 2005 at 12:18 AM.
-
Jan 7th, 2005, 02:50 PM
#2
Re: End of statement expected?
you can't assign a value to an element of the array on a redim statement..
VB Code:
Dim results(0,0,0) As String
Dim index As Long
redim preserve results(index,0,0)
results(index,0,0) = "somestringvalue"
-
Jan 7th, 2005, 03:31 PM
#3
PowerPoster
Re: End of statement expected?
 Originally Posted by kleinma
you can't assign a value to an element of the array on a redim statement..
VB Code:
Dim results(0,0,0) As String
Dim index As Long
redim preserve results(index,0,0)
results(index,0,0) = "somestringvalue"
Surely you can only redim the final dimension if you use Preserve?
Taxes
The more I learn about VB.NET the more I like dBaseIII Plus
The foregoing, whilst believed to be correct, is given without guarantee as to it's accuracy and entirely without recourse. You are required to decide for yourself whether or not it is suitable for your purposes and no liability for loss of any nature can be entertained.
-
Jan 7th, 2005, 03:43 PM
#4
Thread Starter
Fanatic Member
Re: End of statement expected?
Thanks for reminding me.... Now what about this. In classic VB6 I could do multi-dimensional arrays. How do i do them in VB.NET?
An unhandled exception of type 'System.ArrayTypeMismatchException' occurred in microsoft.visualbasic.dll
Additional information: 'ReDim' can only change the rightmost dimension.
-
Jan 7th, 2005, 04:03 PM
#5
Re: End of statement expected?
 Originally Posted by taxes
Surely you can only redim the final dimension if you use Preserve?
yeah I think thats right... last dimention only
-
Jan 7th, 2005, 09:44 PM
#6
PowerPoster
Re: End of statement expected?
 Originally Posted by nkad
Thanks for reminding me.... Now what about this. In classic VB6 I could do multi-dimensional arrays. How do i do them in VB.NET?
The example given IS a multi dimension array.
Taxes
The more I learn about VB.NET the more I like dBaseIII Plus
The foregoing, whilst believed to be correct, is given without guarantee as to it's accuracy and entirely without recourse. You are required to decide for yourself whether or not it is suitable for your purposes and no liability for loss of any nature can be entertained.
-
Jan 8th, 2005, 12:18 AM
#7
Thread Starter
Fanatic Member
Re: End of statement expected?
-
Jan 8th, 2005, 07:28 AM
#8
PowerPoster
Re: End of statement expected?
 Originally Posted by nkad
right, i know that. thx.
Then what did you mean in your last question?
Taxes
The more I learn about VB.NET the more I like dBaseIII Plus
The foregoing, whilst believed to be correct, is given without guarantee as to it's accuracy and entirely without recourse. You are required to decide for yourself whether or not it is suitable for your purposes and no liability for loss of any nature can be entertained.
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
|