From ec56bffe4a4d41773d746a29e145b48a298e333e Mon Sep 17 00:00:00 2001 From: Matthias Felleisen Date: Tue, 23 Aug 2011 13:46:28 -0400 Subject: [PATCH] added a warning concerning cross-platform workings of teachpack --- .../teachpack/2htdp/scribblings/batch-io.scrbl | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/collects/teachpack/2htdp/scribblings/batch-io.scrbl b/collects/teachpack/2htdp/scribblings/batch-io.scrbl index 1afb0b4717..c007cc6186 100644 --- a/collects/teachpack/2htdp/scribblings/batch-io.scrbl +++ b/collects/teachpack/2htdp/scribblings/batch-io.scrbl @@ -45,6 +45,9 @@ The batch-io teachpack introduces several functions and a form for reading content from files and one function for writing to a file. +@; ----------------------------------------------------------------------------- +@section{IO Functions} + All functions that read a file consume the name of a file and possibly additional arguments. They assume that the specified file exists in the same folder as the program; if not they signal an error: @@ -148,6 +151,17 @@ There is only one writer function at the moment: (with-handlers ([exn:fail:filesystem? void]) (delete-file "output.txt"))) +@bold{Warning}: The file IO functions in this teachpack are platform + dependent. That is, as long as your programs and your files live on the + same platform, you should not have any problems reading the files that + programs wrote and vice versa. If, however, one of your programs writes a + file on a Windows operating system and if you then copy this output file + to a Mac, reading the copied text file may produce extraneous ``return'' + characters. Note that this describes only one example of possible + malfunction; there are other cases when trans-platform actions may cause + this teachpack to fail. + +@; ----------------------------------------------------------------------------- @section{Testing} @defform[(simulate-file process str ...)]{