10-08-2008 4:32 PM
Hi abappers,
How come it's not passing when the condition is Amount < 0 where Amount =
0.80. It recognized as greater than 0. The data type is DEC(12,2). What should be the correct statement?
10-08-2008 5:49 PM
10-08-2008 4:34 PM
10-08-2008 4:34 PM
10-08-2008 5:47 PM
hie Ella
to make it easier all amounts that are less than zero have a negative sign either leading or trailing.
-0.80 .....0.....0.80
regards
prince isaac
10-08-2008 5:49 PM
10-08-2008 5:55 PM
You have
IF A < B....
What are the types of the two variables of A and B? If one or more is actually a character based type, then you'll encounter your problem.
oh... hang on. Try amount < '0.80'.
matt
10-08-2008 5:57 PM
Hi
Where is your problem, u need to check if the amount is greater than 0:
DATA: AMOUNT TYPE P.
MOVE '0.80-' TO AMOUNT.
IF AMOUNT => 0.
......do something
ELSE.
WRITE: 'Invalid number'.
ENDIF.
Max