steve-myers wrote:There are two "ringers" here.[list]
Mr. Scherrer's analysis about packed decimal signs is incorrect. There is no such thing as a hexadecimal O (character O, not digit 0). A packed decimal sign is the last 4 bits (1 hexadecimal digit) of a packed decimal value. There are two classes of packed decimal signs.[list]
[*]"Preferred" signs: C for positive and D for negative. The packed decimal instructions always generate a "preferred" sign. To a lazy eye, D often looks like O,
[*]Alternate signs: A, B, E and F. The only one I have memorized is F, which is considered to be positive.
I believe that that is not entirely the case. F is considered unsigned
, although it is treated as positive in arithmetic calculations. A COBOL variable declared S9(n) COMP-3 will have a C in the sign nybble; one that is declared 9(n) COMP-3 will have an F. Obviously in a bitwise comparison they will be found to be different; in a HLL arithmetic comparison, I'm not sure (I'll give it a try tomorrow).
"You have sat too long for any good you have been doing lately ... Depart, I say; and let us have done with you. In the name of God, go!" -- what I say to a junior programmer at least once a day