Jensen's Device: Difference between revisions

m
→‎[[Jensen's Device#python]]: typo 'now the actual passed "i" iS incremented'.
(→‎{{header|Haskell}}: if it doesn't matter, make it undefined)
m (→‎[[Jensen's Device#python]]: typo 'now the actual passed "i" iS incremented'.)
Line 77:
WHILE i <= hi DO # ALGOL 68 has a "for" loop but it creates a distinct #
temp +:= term; # variable which would not be shared with the passed "i" #
i +:= 1 # Here the actual passed "i" inis incremented. #
OD;
temp
Line 205:
while i.value <= hi: # Python has a "for" loop but it creates a distinct
temp += term() # variable which would not be shared with the passed "i"
i.value += 1 # Here the actual passed "i" inis incremented.
return temp
# note the correspondence between the mathematical notation and the call to sum