473,387 Members | 1,745 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,387 software developers and data experts.

less than or equal to operator

when using <= and >= is it a bad idea to put them in the same statement?

i.e. suppose i and j form an interval and random is a number that may or maynot be inside this interval.

if(i<=random && j>=random)
do stuff;
else
not there;

could this return false information??
Apr 16 '06 #1
0 8151

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: William Payne | last post by:
Hi, I was going through some old code of mine and spotted this: if(i == 16 || i == 32 || i == 48 || i == 64 || i == 80 || i == 96 || i == 112 || i == 128 || i == 144 || i == 160 || i == 176 || i...
7
by: Ridimz | last post by:
I have implemented a binary search tree and am interested in displaying all keys less than a certain value. I understand how to approach this task if the searchValue is equal to root.key()....
1
by: Propel Exacto | last post by:
Hey guys, I am using MySQL 4.0.18 and I have a field named "order_datetime" in which I store data in the format 20041001 23:00:00 (for example Oct 1, 2004 11pm) When I do a select statement...
4
by: Jeremy Howard | last post by:
Hello everyone, I'm not a database guru so I'm sorry if this is a dumb question but here it goes... I have this sql query that I'm trying to run against a table on a Sql 2k server: SELECT ...
15
by: Murt | last post by:
Hi, when writing equations in vb .net, how do you enter the signs "less than or equal to" etc. thanks Murt
5
by: lallous | last post by:
Hello How can I define an operator for such: bool operator<(my_class *l,my_class *r) { return l->_attribute < r->_attribute; } So that I can use with std::less, as:
11
by: Martin Jørgensen | last post by:
Hi, - - - - - - - - - - - - - - - #include <iostream> #include <string> #include <map> using namespace std; int main() {
16
by: Cory Nelson | last post by:
Does anyone know how std::set prevents duplicates using only std::less? I've tried looking through a couple of the STL implementations and their code is pretty unreadable (to allow for different...
3
by: ek | last post by:
I have the following class: template<typename I> class test { public: test(I i) : pp(i) {} I getpp() const { return pp; }
3
by: sfrvn | last post by:
I have searched high and low and cannot find an answer to my problem. So now I turn to the collective genius of this newsgroup. Over-simplified examples This query criteria for field works:...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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,...

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.