GeraldWodni / theforth.net

Package registry website for the Forth programming language
GNU General Public License v3.0
15 stars 4 forks source link

use environment? to test for gforth #18

Closed lolbinarycat closed 3 years ago

lolbinarycat commented 3 years ago

use this to conditionally include compat-gforth.4th:

S" gforth" environment? [IF] 2drop ( ... ) [THEN]
GeraldWodni commented 3 years ago

environment? would indeed be a valid mechanism. However over the last decade it fell out of favor and was replaced by [DEFINED] and friends.

I believe you cannot even use it to test for Forth-2012 compliance (I could be wrong about that, so please see for yourself).

If you want to discuss the usage of environment? and make a case for it, may I redirect you to the Forth Standard.