wmb@pi.Eng.Sun.COM (Mitch Bradley) (06/02/90)
The ANS Forth division compromise does NOT make it impossible to write portable code. It just means that the vendor-supplied "/" operator is not the operator you use to write it. There are 3 completely-portable, precisely-defined division operators "UM/MOD", "FM/MOD", and "SM/MOD" which you can use to get exactly the behavior that you need. If you insist on using the word "/" to mean a particular kind of division, then your application can redefine "/" in terms of one of the precise operators. Example - if you want "/" to be floored, then add this line to the start of your application: : / S>D FM/MOD NIP ; So far, I know of NO decision that the committee has made that makes it impossible to portable code. Quite the contrary. In cases where the meaning of a particular (controversial) word has been declared to be implementation-defined, new words with "neutral" names have been provided to do the precise things. A similar example is "NOT" . It was impossible to get people to agree on whether it means bitwise logical inversion or negation of a flag. So, "NOT" is no longer a standard word (and in actual fact, "NOT" has not been portable since 1983). Instead, the word "INVERT" means bitwise logical inversion, no questions asked, and the word "0=" means flag negation. Again, those people who insist on using "NOT" in their application are free to define it at the start of their application, to mean whatever they insist that it should mean. Mitch Bradley