473,507 Members | 6,727 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

no boundary check ?

Hi All,
I saw my code jump out the function call directly without throw a
boundary error....

no boundary check ?

string[] str_member_id = new string[100];

str_member_id[id_count] = "sth"; // exit directly without throw a msg
when id_cound=101;
Best regards,
Boki.

Jun 30 '07 #1
3 1759
Boki <bo******@ms21.hinet.netwrote:
I saw my code jump out the function call directly without throw a
boundary error....

no boundary check ?

string[] str_member_id = new string[100];

str_member_id[id_count] = "sth"; // exit directly without throw a msg
when id_cound=101;
No, it will be throwing an IndexOutOfRangeException. If you have some
reason to believe this isn't happening, please post some code which
demonstrates it.

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
If replying to the group, please do not mail me too
Jun 30 '07 #2
On Jul 1, 6:23 am, Jon Skeet [C# MVP] <s...@pobox.comwrote:
Boki <bokit...@ms21.hinet.netwrote:
I saw my code jump out the function call directly without throw a
boundary error....
no boundary check ?
string[] str_member_id = new string[100];
str_member_id[id_count] = "sth"; // exit directly without throw a msg
when id_cound=101;

No, it will be throwing an IndexOutOfRangeException. If you have some
reason to believe this isn't happening, please post some code which
demonstrates it.

--
Jon Skeet - <s...@pobox.com>http://www.pobox.com/~skeet Blog:http://www.msmvps.com/jon.skeet
If replying to the group, please do not mail me too
No, I didn't catch it. just assume code will stop and let me know it.
Thanks.

Boki.

Jul 1 '07 #3
Boki wrote:
>[...]
No, I didn't catch it. just assume code will stop and let me know it.
Thanks.
Perhaps you've run your application outside without your debugger or
started a release build ?
Boki.
Andre
Jul 1 '07 #4

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

Similar topics

1
1747
by: Daniele Varrazzo | last post by:
Hi everybody, i'm experiencing crashing of the apache process when a mod_python handler access the properties "boundary" and "allowed_xmethods" of the request argument. This prevents the use of...
14
19084
by: Singleton | last post by:
Can some one guide me what is word boundary? google is no good for me for this thanks in advance
1
1432
by: Devrobcom | last post by:
Hi I have read somwhere that this problem is handled by the Intel cpu's (firmware), but what will happen on other types of cpu's. struct { char aa; // even boundary 0xaa00 char bb; ...
11
3746
by: Taran | last post by:
Hi all, I was wondering how does address alignment to x byte boundary is done. For example, if I say "adjust the requested size to be on a 4-byte boundary" or for that matter 8 byte boundary....
1
1909
by: Nick Bishop | last post by:
I have a problem where I call a method in a C++ class with a pointer which is a static member in that class. When I use a debugger, I see the pointer having a certain value, but when I step into...
2
9893
by: szabi | last post by:
Hi! I have seen in a couple of libraries that object are never passed through dll boundary, instead the results are returned through an output parameter reference like: void f(std::string &s)...
2
2745
by: jjouett | last post by:
I'm trying to setup an ASPX web page to service requests from an existing Java Client that posts multi-part data as a way to upload files, and I can't find a straightforward way to process the...
29
2787
by: K. Jennings | last post by:
I would like to get the result of malloc() such that it is aligned on a given boundary - 8, in this case. Assuming that sizeof(u64) is 8, will u64 *p = malloc(N) ; do the trick in general? ...
2
2534
by: kgeorge2 | last post by:
A library which i use, has an array class class LibArray { public: LibArray():_array(NULL),_len(0); LibArray(int n, float val):_array( new float),_len(n){} /** more complete definition...
0
7109
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
7313
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
7372
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
7481
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5619
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
3190
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3179
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1537
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
758
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.