[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

INC/DEC behaviour



I've been asked to post this message to take a vote on whether anyone
would strongly object to making the INC/DEC procedures more like the
assignment which are semantically equivalent.  The problem is
that the second argument must currently be of the same type as the
first argument.  This goes against the intuitive behaviour of allowing
any type-compatible integer argument.  As a matter of fact, the 
single-argument INC/DEC even goes against this behaviour if one
assumes that the second implicit argument is a SHORTINT of 1 and the
first argument can be any integer type.  

I would like to see the INC/DEC type compatibility exactly the same
as the statements:

      i:=i+j   or i:=i-j

where the types of i and j are such that both are integers and the
type of j is an integer-compatible type.

So far, I'm aware that the Oberon/F compiler allows the less
restrictive form of the INC/DEC as proposed here.  The ETH systems
do not.

Michael Griebling