Page 2 of 2

Re: MAX with two arguments

Posted: Thu Sep 03, 2020 8:22 am
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