text: Fixed enviroment queries: vocabulary environment ( -- ) \ gforth 24: \ for win32forth compatibility 25: 26: ' environment >body constant environment-wordlist ( -- wid ) \ gforth 27: \G @i{wid} identifies the word list that is searched by environmental 28: \G queries. 29: 30: 31: : environment? ( c-addr u -- false / ... true ) \ core environment-query 32: \G @i{c-addr, u} specify a counted string. If the string is not 33: \G recognised, return a @code{false} flag. Otherwise return a 34: \G @code{true} flag and some (string-specific) information about 35: \G the queried string. 36: environment-wordlist search-wordlist if 37: execute true 38: else 39: false 40: endif ; 41: 42: : e? name environment? 0= ABORT" environmental dependency not existing" ; 43: 44: : $has? environment? 0= IF false THEN ; 45: 46: : has? name $has? ; 47:. 55: 8 constant ADDRESS-UNIT-BITS ( -- n ) \ environment 56: \G Size of one address unit, in bits. 57: 58: 1 ADDRESS-UNIT-BITS chars lshift 1- constant MAX-CHAR ( -- u ) \ environment 59: \G Maximum value of any character in the character set 60: 61: MAX-CHAR constant /COUNTED-STRING ( -- n ) \ environment 62: \G Maximum size of a counted string, in characters. 63: 77: \G True if @code{/} etc. perform floored division 92: \G Counted string representing a version string for this version of 93: \G Gforth (for versions>0.3.0). The version strings of the various 94: \G versions are guaranteed to be ordered lexicographically. 95: 96: : return-stack-cells ( -- n ) \ environment 97: \G Maximum size of the return stack, in cells. 98: [ forthstart 6 cells + ] literal @ cell / ; 99: 100: : stack-cells ( -- n ) \ environment 101: \G Maximum size of the data stack, in cells. 102: [ forthstart 4 cells + ] literal @ cell / ; 103: 104: : floating-stack ( -- n ) \ environment 105: \G @var{n} is non-zero, showing that Gforth maintains a separate 106: \G floating-point stack of depth @var{n}. 107: [ forthstart 5 cells + ] literal @ 108: [IFDEF] float float [ELSE] [ 1 floats ] Literal [THEN] / ; 109: 110: 15 constant #locals \ 1000 64 / 111: \ One local can take up to 64 bytes, the size of locals-buffer is 1000 112: maxvp constant wordlists 113: 114: forth definitions 115: previous 116: