[plt-scheme] If expressions in Embedded PLT Scheme

From: Carl Eastlund (cce at ccs.neu.edu)
Date: Wed Oct 8 13:14:00 EDT 2008

If you use "when" in place of "if", you'll get the one-clause if
behavior, or you can use the legacy mzscheme behavior by putting
"#lang mzscheme" at the top of your program (instead of "#lang
scheme").

--Carl

On Wed, Oct 8, 2008 at 12:47 PM, Samuel Rebelsky <rebelsky at grinnell.edu> wrote:
> I am embedding MzScheme/PLT Scheme in a program.
>
> In MzScheme (v372 is the one I had been using), it was permissible to write
> if expressions without an alternate, as in
>
>  (if (> x 1) (display x))
>
> When I embed the new PLT Scheme (v401, I think), for the same expression, I
> get an error message that it 'must have an "else" expression'.
>
> R6RS seems to suggest that the no-alternate form is still valid
>
>  http://www.r6rs.org/final/html/r6rs/r6rs-Z-H-14.html#node_sec_11.4.3
>
> Is there a way to turn off the "require alternate" behavior in embedded PLT
> Scheme?
>
> Thanks!
>
> -- Sam Rebelsky


Posted on the users mailing list.