Questions tagged [range-checking]
29 questions
1
vote
1 answer
Can i set {$RangeChecks on} for a unit that has no interface?
I have a delphi project that contains alot of forms and units(with no interface), the forms where i place" {$RangeChecks on} " catches the out of range exception but when i add it to a unit that conatins classes it does not catch the exception, any…

Sara S.
- 1,365
- 1
- 15
- 33
0
votes
1 answer
How to store user inputs in an array and check if the two array has the same element
I'm trying to make a quiz checker where the user will input their answer and it will automatically check in the array. Any tips?
Here is my code:
int main()
{
string aswer[] = { "D", "C", "D", "D", "A"); //
char input[5];
int counter…

New Programmer
- 37
- 6
0
votes
2 answers
how to compare two list values whether their are falling in same range or not using python based on tolreance
I have two list naming x and y i.e.,
x = [5.959099113541438, 4.279741749390212, 5.919230806380509,
4.881404217563612, 4.643287477596932, 5.70059531654403,
5.18744222885107, 5.395735445427837, 5.689814995270075,
4.754347454466908,…

vikas madoori
- 147
- 1
- 11
0
votes
2 answers
How do i check whether characters are within certain ascii value ranges?
How do i check whether a character is between 0-9, A-Z, and a-z? I understand that you can use cmp char, 'A' or cmp char, '0', etc. However if i have to check three different ranges, how do i do that?
If i need to check whether 'A'<= C <= 'Z', then…

Alejandro Harrison
- 21
- 5
0
votes
0 answers
Indy HttpClient.Post gives range check error when built for release but not in debug - why?
I am using Delphi 2009, Indy ver 10.5498 together with libeay32.dll and ssleay32.dll from the zip file openssl-1.0.2r-i386-win32 at https://indy.fulgan.com/SSL/.
Range checking is turned on in project options and not turned off anywhere.
Using the…

user2834566
- 775
- 9
- 22
0
votes
0 answers
Implementing an Enqueue function (PASCAL)
I'm having trouble getting the queue in my program to work. Every adjustment I've tried has resulted in an 'ERangeError: Range check error'.
I know this is because the program is trying to access something that doesn't exist, but I cannot figure out…

Reccho
- 97
- 6
0
votes
2 answers
Checking if the numbers in a list in a list are in a certain range
So I have a list with multiple list in it which represent something like coordinates. In my case they are positions on a chessboard.
The list would look something like this:
[(3, 3), (4, 3), (5, 3), (6, 3), (3, 4), (4, 4), (5, 4), (6, 4), (3, 5),…

Kolick
- 1
0
votes
2 answers
conditional statement to verify range provided by #define(d) integers in header for transaction module (.cpp)
First time posting on stackoverflow. I am not sure if the question is clear enough so I will try to explain the problem and provide my code as well.
I am guessing my problem is some issue that has to do with the conditional if statements that I have…

a-one
- 103
- 11
0
votes
3 answers
How to determine a date in between Friday and Sunday of the week at a particular time
I'm trying to check a current date and time is in between Friday 17:42 and Sunday 17:42 of the week with Java.
At the moment I'm doing this with really really bad code block. It was a hurry solution. Now I'm refactoring but I couldn't find any…

Taylan Derinbay
- 128
- 3
- 13
0
votes
1 answer
Range check error while evaluating constants
I am running into a lots of compiler warnings:
Range check error while evaluating constants
for the similar statements throughout my program.
TxMsg is a byte.
GetRegs(0) returns WORD datatype result.
TxMsg[0] := (GetRegs(0) shr 8) and $0F;
What I…

ThN
- 3,235
- 3
- 57
- 115
-1
votes
2 answers
C# Checking values within Array
I'm absolutely stuck so I would appreciate some guidance into how I can do this.
First off, here is my code so far:
int i;
int x = 0;
int b = 0;
Console.Write("\nHow many stocks to enter price for:\t"); // enter size of array
int size =…

nullcat
- 3
- 1
-1
votes
1 answer
What is a safe, cross-platform way to perform range checks before casting to a smaller numeric type?
Here is the closest duplicate I could find.
Despite the tags, the question seems to be about C, and the usable answer references the C99 spec.
What is the correct way to handle this check in C++98, without using Boost or other libraries?
user2201041
-1
votes
1 answer
Unable to get error message in Java Program
I am solving a problem on spoj, here is the URL http://www.spoj.com/problems/FACEFRND/
But getting an error and unable to identify my mistake, code is as follows:
import java.util.ArrayList;
import java.util.Scanner;
public class Facefrnd {
…

Noname
- 25
- 1
- 7
-1
votes
1 answer
RangeCheck with Positive and Negative Numbers
I'm working on a small game which has a graph. The idea is I do an action whilst the target location (designated by upper and lower bounds) has no been met (within 0.5). For example, if I target (7,7), the loop should stop when x and y are (both in…

mino
- 6,978
- 21
- 62
- 75