range-checking Questions
3
Solved
How can one switch off range checking for a part of a file. Switching off is easy, but how do I revert to the project setting later on? The pseudo-code below should explain it:
Unit1;
//here's ra...
Lucius asked 14/2, 2011 at 22:16
7
Solved
Is it possible to create a templated function that checks if a primitive data type can fit a value of potentially different primitive data type? Let's limit the scope to integer types for the momen...
Hyades asked 20/6, 2013 at 21:37
2
Solved
So I just came across what seems to me like a strange Python feature and wanted some clarification about it.
The following array manipulation somewhat makes sense:
p = [1,2,3]
p[3:] = [4]
p = [...
Solfatara asked 10/2, 2019 at 5:52
7
Solved
I stumbled upon this piece of code in .NET's List source code:
// Following trick can reduce the range check by one
if ((uint) index >= (uint)_size) {
ThrowHelper.ThrowArgumentOutOfRangeExcept...
Vassili asked 30/3, 2015 at 10:10
1
Solved
I want to check whether the given coordinates are withing an array or not.
public boolean checkBounds(int x, int y) {
try {
Object val = array[x][y];
return true;
} catch (ArrayIndexOutOfBound...
Soninlaw asked 18/9, 2013 at 12:50
1
Solved
I'm trying to implement an instantiator function for my Bound template wrapper but I can't get it to work. I need this in order to convince people at work that we should switch from Ada
to D.
I w...
Chinatown asked 6/7, 2013 at 11:51
1
Solved
Consider:
{$R+}
i:= 1;
While i > 0 do
i:= i + 1;
ShowMessage(IntToStr(i));
If I declare i as Byte, Word, Shortint or TinyInt I get a range-check error, as expected.
If I declare i as LongWor...
Neale asked 18/4, 2012 at 8:53
2
Solved
I have a program that assigns an array beyond it's bounds, and I was expecting a run-time error to be thrown. Yet no error is raised at all and the program proceeds to write into undeclared memory....
Insincerity asked 23/3, 2012 at 14:12
1
© 2022 - 2024 — McMap. All rights reserved.