[plt-scheme] What's wrong with define inside begin which is inside if

From: Andre Mayers (andre.mayers at usherbrooke.ca)
Date: Mon Sep 4 10:21:23 EDT 2006

If I try to evaluate the following expression
 
    (if (< 1 0)
        (begin (define z 4)
               (* z 2))
        3)
 
I got the following answer 
 
    define: not allowed in an expression context in: (define z 4)
 
 
What is the principle behind that ? 
I can't find the answer with Revised^5 Report on the Algorithmic Language
Scheme 

----

André Mayers, Ph.D., M. Ps.
professeur agrégé
Département d'informatique
Université de Sherbrooke
Sherbrooke (Québec) Canada J1K 2R1
tél: +1 819-821-8000 poste 62041
fax: +1 819-821-8200
andre.mayers at usherbrooke.ca
http://www.dmi.usherb.ca/~amayers



 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20060904/82f8f50d/attachment.html>

Posted on the users mailing list.