Data update
This commit is contained in:
parent
0df55f9f24
commit
aec8ed51b6
1045 changed files with 18889 additions and 2777 deletions
|
|
@ -1,6 +1,8 @@
|
|||
fvariable ii \ i is a Forth word that we need
|
||||
: sum ( xt1 lo hi xt2 -- r )
|
||||
0e swap 1+ rot ?do ( addr xt r1 )
|
||||
i s>f over execute f! dup execute f+
|
||||
: sum ( i-xt lo hi term-xt -- r )
|
||||
\ stack effects: i-xt ( -- addr ); term-xt ( -- r1 )
|
||||
0e swap 1+ rot ?do ( r1 xt1 xt2 )
|
||||
i 2 pick execute ! dup execute f+
|
||||
loop 2drop ;
|
||||
' ii 1 100 :noname 1e ii f@ f/ ; sum f.
|
||||
|
||||
variable i1 \ avoid conflict with Forth word I
|
||||
' i1 1 100 :noname 1e i1 @ s>f f/ ; sum f.
|
||||
|
|
|
|||
9
Task/Jensens-Device/Forth/jensens-device-3.fth
Normal file
9
Task/Jensens-Device/Forth/jensens-device-3.fth
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
: sum< ( run-time: hi+1 lo -- 0e )
|
||||
0e0 postpone fliteral postpone ?do ; immediate
|
||||
|
||||
: >sum ( run-time: r1 r2 -- r3 )
|
||||
postpone f+ postpone loop ; immediate
|
||||
|
||||
: main ( -- )
|
||||
101 1 sum< 1e0 i s>f f/ >sum f. ;
|
||||
main
|
||||
Loading…
Add table
Add a link
Reference in a new issue