473,406 Members | 2,847 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

BUG: Non-vector array mess-up

Did anyone notice a major bug in vb.net. The clr has two types of 'arrays':
vectors (1 dimensional, 0 based) and other arrays (any base, any dimensions).
In vb.net, you can only declare vectors, not 1-dimensional arrays. But when
you import an assembly, it recognizes all 1-dimensional arrays as vectors,
gets very confused, and creates unverifiable code that has major bugs in it
because it stores 1-dim arrays in vector variables.
Jun 27 '08 #1
3 1013
On 2008-04-18, Cholent <Ch*****@discussions.microsoft.comwrote:
Did anyone notice a major bug in vb.net. The clr has two types of 'arrays':
vectors (1 dimensional, 0 based) and other arrays (any base, any dimensions).
In vb.net, you can only declare vectors, not 1-dimensional arrays. But when
you import an assembly, it recognizes all 1-dimensional arrays as vectors,
gets very confused, and creates unverifiable code that has major bugs in it
because it stores 1-dim arrays in vector variables.
This is probably why you can't create a 1-dimensional non-zero based
array in VB.NET. I think it has always been there - in fact, I believe
you can't use 1-dimensional non-zero based arrays from C# either...

--
Tom Shelton
Jun 27 '08 #2
I've just wrote the following il code:

int32[...] ArrayCast(class System.Array obj)
{ldarg.0
castclass int32[...]
ret}
If I pass it a 2-dim. array it fails with 'invalidcastexception' but if I
pass it a 1-dim, non-0-based array it works! So it seems to be a problem with
the clr as well.
Jun 27 '08 #3
"Cholent" wrote:
I've just wrote the following il code:

int32[...] ArrayCast(class System.Array obj)
{ldarg.0
castclass int32[...]
ret}
If I pass it a 2-dim. array it fails with 'invalidcastexception' but if I
pass it a 1-dim, non-0-based array
Sorry, typo! I meant a vector (1-dim, 0-based0
it works! So it seems to be a problem with
the clr as well.
Jun 27 '08 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Derek Basch | last post by:
Hello All, I ran into a problem while dynamically constructing XHTML documents using minidom. If you create a script tag such as: script_node_0 = self.doc.createElement("script")...
9
by: Drew D. Saur | last post by:
Hello, all. I have searched and searched and searched for details about what I am experiencing, but I can't find a reference anywhere. I know IE has some interesting bugs regarding floats - many...
5
by: R. Kaushik | last post by:
I am posting the code snippet here. It seems to me that the ?: Operator is not behaving properly. It seems like it is a bug: TimeSpan ts1, ts2; float dayHours = 0; ts1 =...
4
by: Aaron Clamage | last post by:
Hi, Could someone please confirm the following? I think I have found a subtle .NET serialization bug. It occurs when object has a list of items containing another object of the same type and...
8
by: David Cameron | last post by:
I noticed that using an HTMLInputRadioButton and specifying a value to be an empty string (""), this is overridden by ASP.Net which set the value of the control to be the same as the ID of the...
8
by: Jay Balapa | last post by:
This am I posted the following message thinking there was a problem with Dot Net Framework 2.0. But problem occurs only with Dot Net 2.0 and IIS 6.0 installed machines. I tested this on my laptop...
26
by: Patient Guy | last post by:
The code below shows the familiar way of restricting a function to be a method of a constructed object: function aConstructor(arg) { if (typeof(arg) == "undefined") return (null);...
158
by: Giovanni Bajo | last post by:
Hello, I just read this mail by Brett Cannon: http://mail.python.org/pipermail/python-dev/2006-October/069139.html where the "PSF infrastracture committee", after weeks of evaluation, recommends...
0
by: Kurt B. Kaiser | last post by:
Patch / Bug Summary ___________________ Patches : 416 open (-14) / 3463 closed (+16) / 3879 total ( +2) Bugs : 930 open ( +8) / 6333 closed (+17) / 7263 total (+25) RFE : 244 open...
8
by: gerry | last post by:
The PagerSettings.Visible property is not being handled properly by the GridView control. The value assigned to this property is not applied until after a postback. Simplest test : .aspx...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.