# Can CompareNoCase comparing number? - Coldfusion - Getting Started

When my CF application run, 2 variables will be created and their values are compared For example, those variables will have value such as: NewID = 1505 Variable2 = 250 OR NewID= 150 Variable2 = 2511 OR NewID= 101 Variable2 = 101 Before some part of the code is run, I need to compare the Variable2 to NewID and find out whether variable2 has the bigger value or smaller value or the same value. From the book, it says that CompareNoCase is comparing string, does CF has similar function for number comparison?...

1. ## Can CompareNoCase comparing number?

When my CF application run, 2 variables will be created and their values are
compared For example, those variables will have value such as: NewID = 1505
Variable2 = 250 OR NewID= 150 Variable2 = 2511 OR NewID= 101 Variable2 = 101
Before some part of the code is run, I need to compare the Variable2 to NewID
and find out whether variable2 has the bigger value or smaller value or the
same value. From the book, it says that CompareNoCase is comparing string,
does CF has similar function for number comparison?

alecken Guest

2. ## Re: Can CompareNoCase comparing number?

EQ, GT, LT, LTE, GTE

Equals, Greater than, Less than, Less than or equal to, Greater than or equal to

ex.
<CFIF num1 GT num2>
<CFOUTPUT>num1 is greater than num2</CFOUTPUT>
</CFIF>

- Shawn
shawnwindler Guest

3. ## Re: Can CompareNoCase comparing number?

Try this:
jdeline Guest

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•