From lliao@ren.eecis.udel.edu Fri Oct 4 23:09:41 2002 Date: Fri, 4 Oct 2002 23:08:54 -0400 (EDT) From: Li Liao Subject: Re: parsing > 1.when I run a parse function on a test file that includes only this line > 1 dup eq {3 write} {} ifelse > I get the following output: > - parse "C:\\test.txt"; > GC #0.0.0.1.7.224: (0 ms) > val it = [Push (Num 1),Dup,Eq,Push (Proc [Push #,Write]), > Push (Proc []),IfElse] > : Command list > > What bothers me is that I see Push # instead of Push (Num 3), > is it a truncated output or an error within the parser? > How do I fix this case? Since you suspect the output might be truncated, have you tried to reset ML output control by using commands given in bboard message 8? Yes, indeed the problem is caused be truncated output. > > 2. how do I view working directory in ML. I used command > OS.FileSys.getDir but this is the output I received > val it = fn : unit -> string You forgot the pair of parentheses. It should be OS.FileSys.getDir(). By the way, in order to parse a file that is not in the present working directory you need provide the path to the file. For example, parse "/home/cis670/hw2/test1.mps"; Li