[plt-scheme] Problems with code from DrScheme 103 on DrScheme 202.

From: Jon Philpott (jon at uv.net)
Date: Sun Sep 1 12:20:01 EDT 2002

Hi,

I'm having some problems with some code I wrote on DrScheme 103
running on Freebsd running on Drscheme 202 running on Mac OS X
10.2.

The problem I'm having is that when in "Textual" language mode
on v202, I dont seem to able to use (define ...) inside a unit, instead
it returns an error to me; "define: allowed only in definition 
contexts".

I figured this may be some problems with my code, so I looked in the
Help Desk under units, and i tried some of the example code, thusly;

Welcome to DrScheme, version 202.
Language: Textual (MzScheme, includes R5RS).
 > (define f1
     (unit (import) (export)
           (define x (current-seconds))
           (display x)
           (newline)
           x))

define: allowed only in definition contexts in: (define x 
(current-seconds))

Again, the same error...

Could someone possibly point out to me what exactly is going wrong here?

Thanks,
Jonathan.




Posted on the users mailing list.