[racket] enter! not working?

From: Brad Long (brad at longbrothers.net)
Date: Sun Jun 27 23:26:33 EDT 2010

Thankyou. My bad. Me newbie - guess you can tell!

Quoting Matthew Flatt <mflatt at cs.utah.edu>:

> Are you working with the `racket' command-line program or within
> DrRacket?
>
> Within DrRacket, you don't need `enter!'.
>
> At Sun, 27 Jun 2010 22:06:52 +1000, "Brad Long" wrote:
>> I am using DrRacket Version 5 on Windows. When I follow the example (see
>> below) and get to the part where I am suppposed to use "enter!", I get this
>> error:
>>
>> reference to an identifier before its definition: enter!
>>
>> Thanks for any help.
>>
>> Brad.
>>
>> ===> START
>>
>> #lang racket
>>
>>   (define (extract str)
>>     (substring str 4 7))
>>
>> If calling (extract "the boy") is part of the main action of your program,
>> that would go in the definitions area, too. But if it was just an example
>> expression that you were using to explore extract, then you'd more likely
>> leave the definitions area as above, click Run, and then evaluate (extract
>> "the boy") in the REPL.
>>
>> With racket, you'd save the above text in a file using your favorite editor.
>> If you save it as "extract.rkt", then after starting racket in the same
>> directory, you'd evaluate the following sequence:
>>
>>   > (enter! "extract.rkt")
>>   > (extract "the gal out of the city")
>>
>>   "gal"
>>
>> The enter! form both loads the code and switches the evaluation context to
>> the inside of the module, just like DrRacket's Run button.
>>
>> =====> END
>>
>>
>> _________________________________________________
>>   For list-related administrative tasks:
>>   http://lists.racket-lang.org/listinfo/users
>




Posted on the users mailing list.