A program that relies on an 'ambiguous condition' can hardly be portable.
If ANS wants to claim documenting it will make it 'standard' that's their >business and yours if you choose to buy into it.
On 9/12/2023 6:18 pm, Anton Ertl wrote:
That depends on the ambiguous condition. In particular, looking at
<https://forth-standard.org/standard/doc#subsection.4.1.2>, I see
|producing a result out of range, e.g., multiplication (using *)
|results in a value too big to be represented by a single-cell integer
|(6.1.0090 *, 6.1.0100 */, 6.1.0110 */MOD, 6.1.0570 >NUMBER, 6.1.1561
|FM/MOD, 6.1.2214 SM/REM, 6.1.2370 UM/MOD, 8.6.1.1820 M*/);
Certainly for * every system with a given cell size produces the same
result. This has led to the result of * overflow being standardized
in the next release <http://www.forth200x.org/twos-complement.html>.
It's interesting that this ambiguous condition does not mention +, -,
or it's variants.
Bottom line: In some cases there is common practice even if it has not
been standardized.
I don't think that the documentation in 4.1.2 is useful to find such
common practice, though.
It was 'ambiguous' because the result was mathematically incorrect.
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 300 |
Nodes: | 16 (2 / 14) |
Uptime: | 52:12:48 |
Calls: | 6,712 |
Calls today: | 5 |
Files: | 12,243 |
Messages: | 5,355,177 |
Posted today: | 1 |