From lliao@ren.eecis.udel.edu Mon Nov 18 21:49:18 2002 Date: Mon, 18 Nov 2002 21:44:21 -0500 (EST) From: Li Liao Subject: Re: hw4 assign/test > I have a question about task 6. Initially, I was thinking that > the most natural thing to do is to leval e1 and eval e2 and insert them ^^^^^^ You are right about leval e1 and eval e2. But you are wrong to insert a binding into the dictionary. Assignment is meant to update a variable with new value. This is done by using := > in the dictionary. Obviously, the problem with this approach is the fact > that leval returns Value ref and insert expects string*Value ref*Value > ref Dict. On another hand, with my current implementation (I attach my > code) I never happen to use leval which is puzzling me. So, I am not > sure shall I try to implement task 6 using leval ? > My code compiles fine and I believe that I understand well the concept of all tasks and the whole program in general, but when I test it: > >run "test.txt" > my output is >"uncaught exception NotFound > raised at: hw4.sml ......" > > Can you, please, give me a hint of what I might be doing wrong ? This error shall be caused by not finding something in a dictionary, which is likely related to your implementation of assignment aforementioned.