View previous topic :: View next topic
|
Author |
Message |
SSR Warnings : 1 New User
Joined: 26 Feb 2006 Posts: 38
|
|
|
|
Hi,
I have two variables. One is from the file (Trailer count x(9)). another is a counter that i have in the program 9(7).
counter1 x(9) - value is '000000045'
counter2 9(7) - value is '0000045'
If u compare, both have to be equal logically (45 & 45) but the result says they are different. I hope it does a character comparison since one is character.
Kindly, let me know is there any other alternative.
Regards
SSR |
|
Back to top |
|
|
guptae
Moderator
Joined: 14 Oct 2005 Posts: 1208 Location: Bangalore,India
|
|
|
|
Hi SSR,
One alternative is to move counter1 to numeric variable if it is numeric & then compare. |
|
Back to top |
|
|
sandeep1dimri
New User
Joined: 30 Oct 2006 Posts: 76
|
|
|
|
Hi SSR,
The comparision can be done only for compatible data types.
You can redefine the counter1 as
counter1-num redfeines counter1
Then compare counter1-num and counter2. I hope this will work fine.
Sandeep |
|
Back to top |
|
|
|