View previous topic :: View next topic
|
Author |
Message |
usharaniA
New User
Joined: 22 Jan 2008 Posts: 85 Location: India
|
|
|
|
Hi,
I want to compare two datas ,
data1=5.00
data2=5.0
I have used the compare build in function, but the result was a mismatch,
is there any build in function to compare only the actual values or else any other mean to solve this |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
Have you tried ...........................
IF DATA1 = DATA2 |
|
Back to top |
|
|
usharaniA
New User
Joined: 22 Jan 2008 Posts: 85 Location: India
|
|
|
|
thanks a lot.
I hav tried it, its working |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
why not try
IF data1 = data2
then
else
if data1 < data2
then
else
if data1 = data2
then
end
end
end
what was the mismatch? that you are talking about?
the compare built-in function returns a zero of the strings are identical
otherwise you get the offset of the first offending char.
in an IF Data1 = Data2 are considered equal.
in an IF Data1 == Data2 are considered not equal.
maybe you want 'strict comparision operator'. |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
Or you could have used the pad character in the compare statement.
Quote: |
maybe you want 'strict comparision operator'. |
Or maybe the super deluxe dominatrix comparison operator |
|
Back to top |
|
|
|