Home  |   Notes  |   Languages  |   Programs  |   Homework

Re: file operation error

New Message Reply About this list Date view Thread view Subject view Author view

Stephen Edwards (edwards@CS.VT.EDU)
Wed, 24 Oct 2001 08:46:06 -0400


Message-ID:  <3BD6B80E.B6943C2F@cs.vt.edu>
Date:         Wed, 24 Oct 2001 08:46:06 -0400
From: Stephen Edwards <edwards@CS.VT.EDU>
Subject:      Re: file operation error

Scott Schneider wrote:
>
> If you run a set of input, and it fails, it will never release hold of
> output.txt. This means that if you fix your code, and rerun, it will spit
> back this error message. This is bad. Just exit from Scheme which forces
> it to give up output.txt.

This is exactly correct.

If you are using p2-in.scm or the input file from a curator e-mail
message, and you know your program has errors, one thing you can
do is to simply comment out the first line (the "ignore-errors"
line) as well as the matching closing parentheses on the last
line (the last 2). Then when you run things interactively, you
will drop into the debugger at exactly the place where the error
occurs.

In addition, you can comment out the first 2 lines (the
"ignore-errors" and "with-output-to-file" lines) as well as the
matching closing parentheses on the last line (the last 4), which
will send all output to the screen instead of to the named file.

                                -- Steve

--
Stephen Edwards            604 McBryde Hall          Dept. of Computer Science
e-mail      : edwards@cs.vt.edu           U.S. mail: Virginia Tech (VPI&SU)
office phone: (540)-231-5723                         Blacksburg, VA  24061-0106
-------------------------------------------------------------------------------


New Message Reply About this list Date view Thread view Subject view Author view

Home  |   Notes  |   Languages  |   Programs  |   Homework
copyright © 2001 Virginia Tech, ALL RIGHTS RESERVED
Class site maintained by Stephen H. Edwards <edwards@cs.vt.edu>