[plt-scheme] Problems with code from DrScheme 103 on DrScheme 202.
In version 20x, units are not built in, but are in an external library.
You need to put:
(require (lib "unit.ss"))
or
(require (lib "unitsig.ss"))
at the top of your code.
Robby
At Sun, 1 Sep 2002 17:20:01 +0100, Jon Philpott wrote:
> For list-related administrative tasks:
> http://list.cs.brown.edu/mailman/listinfo/plt-scheme
>
> 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.
>