Closed TheLoneWolfling closed 8 years ago
In for_do:
(print (reduce y acc cur (do (let x (* acc 98)) (/ x curr) ) 1 ))
cur != curr. When division reads curr, it gets an unitialized value instead.
The simple fix would be to add something along the lines of the following:
fprintf(stderr, "Undefined variable: %s\n", ast->content.data.str.body); exit(0);
at lines 88 / 89 of execute.c. In other words, if it couldn't find the variable, error out instead of just ignoring it.
Fixed :-)
In for_do:
cur != curr. When division reads curr, it gets an unitialized value instead.
The simple fix would be to add something along the lines of the following:
at lines 88 / 89 of execute.c. In other words, if it couldn't find the variable, error out instead of just ignoring it.