MAX with two arguments

Josef Templ
Posts: 262
Joined: Tue Sep 17, 2013 6:50 am

Re: MAX with two arguments

Post by Josef Templ »

Robert wrote:Permitting the expression

Code: Select all

MAX(INTEGER, 0)
looks like an error to me, and should be treated as a compiler bug.

I have not followed this discussion very closely, so have two questions:
1 - Do the proposed changes to DevCPB fully resolve this issue?
2 - Is the problem with characters the same issue, or a separate bug?
A character constant can/should be considered to be of string type, not of character type.
This' may explain why it is not included in MIN/MAX.
However, there is also the rule that a string of length 1 can be used as a CHAR (or SHORTCHAR),
so I think it should be supported and the fix seems to be easy.

- Josef
Post Reply