[plt-scheme] suggestions and commendations for exercise 2.21

From: Terrence Brannon (metaperl at urth.org)
Date: Tue Mar 30 12:20:04 EST 2004

Matthias Felleisen wrote:

>
> On Mar 30, 2004, at 4:07 AM, Terrence Brannon wrote:
>
>> [1] convert-repl should take an optional argument serving as the escape
>> string. This is useful if "x" needs to be tested as input to the program
>
>
> What's the escape string?

By escape string, I mean the key sequence used to abort convert-repl. As 
you can see from the transcript below, "x" is the escape string 
hardcoded for use with convert-repl(). The problem with a hardcoded 
escape string is that it may interfere with a function that might need 
to process such an escape string.

Welcome to DrScheme, version 206.
Language: Advanced Student.
Teachpack: 
C:\cygwin\home\metaperl\install\PLT\PLT\teachpack\htdp\convert.ss.
100
 > (convert-repl f2c)
Enter Fahrenheit temperature and press <enter> [to exit, type x]: 212
212F corresponds to 100C
Enter Fahrenheit temperature and press <enter> [to exit, type x]: 32
32F corresponds to 0C
Enter Fahrenheit temperature and press <enter> [to exit, type x]: x

 >


Posted on the users mailing list.