Gil wrote: > DC F'-2147483648' assembles successfully, while > DC A(-2147483648) gets a syntax error. > > A designer's perverse notion of completeness?
The parsing of F-type values was modified to support unsigned values (prefixed with U) which means that it was also able to support values outside the normal range before applying the specified sign. The parsing of self-defining decimal constants in any other context currently parses them as unsigned 31-bit values, with any sign being taken as a separate unary operator applied afterwards. Some years ago I prototyped a change to HLASM which supports signed self-defining decimal constants, so a unary minus preceding a decimal digit is taken to be part of the value (both for assembler expressions and for conditional assembly expressions) which means that decimal self-defining constants could cover the full range, just like the other types (hex, binary and character). The main benefit in practice was that the largest negative number was then allowed in expressions. However, that development item was shelved for some reason, probably mostly due to nervousness about potential incompatibility, although we could not come up with a realistic example of such a problem. I do remember being quite irritated with running into a silly problem in testing due to the historical oddity (which definitely cannot be fixed for compatibility reasons) that substitution of a SETA symbol loses any minus sign, requiring the use of the SIGNED built-in function to transfer the signed value via a SETC symbol! I'll try to revisit that item some time to evaluate whether it might be a good idea to complete it. Jonathan Scott, HLASM IBM Hursley, UK
