[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: New type: Integer
I've added a new pseudotype, "Integer". Please use it instead of Number when you really expect or produce integers. If it's a function's input, please identify the function conversion operation (often INT), and be SURE to write tests that verify it. Obviously, this isn't really "new". I'd avoided creating an Integer type because NOT all functions that expect integers use the same conversion operations (e.g., the text string operations tend to use INT, but ISEVEN/ISODD use TRUNC). But I've realized that having "Integer" in the type signature is still very valuable information, and if we don't mandate a particular integer conversion operation, it serves as a valuable hint for the need to specify the conversion (or, alternatively, to state that it's implementation-defined). I've written some draft text, and converted a few text operations to use Integer, to show what it looks like. The next draft (about to be posted) shows that. --- David A. Wheeler
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]