Jensen's Device: Difference between revisions
→{{header|Forth}}: replaced FVARIABLE ii with VARIABLE i1 (i is integer in the task description)
m (→{{header|Wren}}: Changed to Wren S/H) |
(→{{header|Forth}}: replaced FVARIABLE ii with VARIABLE i1 (i is integer in the task description)) |
||
Line 733:
The following version passes i and 1/i as execution tokens and is thus closer to the original, but less idiomatic:
<syntaxhighlight lang="forth">
\ stack effects:
0e swap 1+ rot ?do (
i
loop 2drop ;
' ii 1 100 :noname 1e ii f@ f/ ; sum f.</syntaxhighlight>▼
variable i1 \ avoid conflict with Forth word I
=={{header|Fortran}}==
|