KBADifferent does not work Fractional part of Dec is 10 dig
Moderators: chulett, rschirm, roy
Please use code tags so that formatting is preserved. I think I see the issue with your changes, but please re-paste with tags.
Kenneth Bland
Rank: Sempai
Belt: First degree black
Fight name: Captain Hook
Signature knockout: right upper cut followed by left hook
Signature submission: Crucifix combined with leg triangle
Rank: Sempai
Belt: First degree black
Fight name: Captain Hook
Signature knockout: right upper cut followed by left hook
Signature submission: Crucifix combined with leg triangle
Code: Select all
PRECISION 14
DataIn1 = TRIM(Arg1)
DataIn2 = TRIM(Arg2)
If (IsNull(DataIn1) and Not(IsNull(DataIn2))) or (IsNull(DataIn2) and Not(IsNull(DataIn1))) Then
Ans = @TRUE
End Else
If IsNull(DataIn1) and IsNull(DataIn2) Then
Ans = @FALSE
End Else
If (Not(NUM(DataIn1)) and NUM(DataIn2)) Or (Not(NUM(DataIn2)) and NUM(DataIn1)) Or (Not(NUM(DataIn1)) and Not(NUM(DataIn2))) Then
If DataIn1 = DataIn2 Then
Ans = @FALSE
End Else
Ans = @TRUE
End
End Else
If SCMP(DataIn1,DataIn2) = 0 Then
Ans = @FALSE
End Else
Ans = @TRUE
End
End
End
End
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Did you try ?
Code: Select all
Compare(DataIn1, DataIn2, "R")
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
This may be a cleaner way of expressing the logic:
Code: Select all
PRECISION 14
DataIn1 = TRIM(Arg1)
DataIn2 = TRIM(Arg2)
Begin Case
Case (IsNull(DataIn1) and Not(IsNull(DataIn2))) or (IsNull(DataIn2) and Not(IsNull(DataIn1)))
Ans = @TRUE
Case IsNull(DataIn1) and IsNull(DataIn2)
Ans = @FALSE
Case NOT(NUM(DataIn1) and NUM(DataIn2))
If DataIn1 = DataIn2 Then Ans = @FALSE Else Ans = @TRUE
Case NUM(DataIn1) and NUM(DataIn2)
If SCMP(DataIn1,DataIn2) = 0 Then Ans = @FALSE Else Ans = @TRUE
Case @TRUE
Ans = @FALSE
End Case
Kenneth Bland
Rank: Sempai
Belt: First degree black
Fight name: Captain Hook
Signature knockout: right upper cut followed by left hook
Signature submission: Crucifix combined with leg triangle
Rank: Sempai
Belt: First degree black
Fight name: Captain Hook
Signature knockout: right upper cut followed by left hook
Signature submission: Crucifix combined with leg triangle
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Code: Select all
PRECISION 14
DataIn1 = TRIM(Arg1)
DataIn2 = TRIM(Arg2)
IsNull1 = IsNull(DataIn1)
IsNull2 = IsNull(DataIn2)
Begin Case
Case IsNull1 + IsNull2 = 1 ; * either is null but not both
Ans = @TRUE
Case IsNull1 + IsNull2 = 2 ; * both are null
Ans = @FALSE
Case NOT(NUM(DataIn1) and NUM(DataIn2))
Ans = (DataIn1 <> DataIn2 )
Case NUM(DataIn1) and NUM(DataIn2)
Ans = (SCMP(DataIn1,DataIn2) <> 0)
Case @TRUE
Ans = @FALSE
End Case
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Premium membership is only a few cents per day, and is totally devoted towards paying for the bandwidth charges for DSXchange. With premium membership you WILL be able to see all of the premium posters' posts.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.