Selaa lähdekoodia

Remove MIN and MAX from core

It isn't used in there anymore. Moved it to VE, the only place
where it's used.
master
Virgil Dupras 3 vuotta sitten
vanhempi
commit
3615944ffa
4 muutettua tiedostoa jossa 2 lisäystä ja 4 poistoa
  1. +2
    -0
      blk/126
  2. +0
    -2
      blk/354
  3. BIN
      cvm/forth.bin
  4. +0
    -2
      doc/dict.txt

+ 2
- 0
blk/126 Näytä tiedosto

@@ -1,5 +1,7 @@
CREATE CMD 2 C, '$' C, 0 C,
CREATE PREVPOS 0 , CREATE PREVBLK 0 ,
: MIN ( n n - n ) 2DUP > IF SWAP THEN DROP ;
: MAX ( n n - n ) 2DUP < IF SWAP THEN DROP ;
: acc@ ACC @ 1 MAX ;
: num ACC @ SWAP _pdacc IF ACC ! ELSE DROP THEN ;
: nspcs ( n -- , spit n space ) 0 DO SPC LOOP ;


+ 0
- 2
blk/354 Näytä tiedosto

@@ -3,8 +3,6 @@
: 0< 32767 > ; : >= < NOT ; : <= > NOT ; : 0>= 0< NOT ;
: >< ( n l h -- f ) 2 PICK > ( n l f ) ROT> > AND ;
: =><= 2 PICK >= ( n l f ) ROT> >= AND ;
: MIN ( n n - n ) 2DUP > IF SWAP THEN DROP ;
: MAX ( n n - n ) 2DUP < IF SWAP THEN DROP ;
: NIP SWAP DROP ; : TUCK SWAP OVER ;
: -^ SWAP - ;
: C@+ ( a -- a+1 c ) DUP C@ SWAP 1+ SWAP ;


BIN
cvm/forth.bin Näytä tiedosto


+ 0
- 2
doc/dict.txt Näytä tiedosto

@@ -213,8 +213,6 @@ Shortcuts: 1+ 2+ 1- 2-
=><= n l h -- f Push true if l <= n <= h
CMP n1 n2 -- n Compare n1 and n2 and set n to -1, 0, or 1.
n=0: a1=a2. n=1: a1>a2. n=-1: a1<a2.
MIN a b -- n Returns the lowest of a and b
MAX a b -- n Returns the highest of a and b
NOT f -- f Push the logical opposite of f

# Strings


Loading…
Peruuta
Tallenna