Newsgroups: comp.lang.scheme
Path: cantaloupe.srv.cs.cmu.edu!bb3.andrew.cmu.edu!newsfeed.pitt.edu!gatech!newsfeed.internetmci.com!in1.uu.net!hodes.com!netcomsv!uu4news.netcom.com!netcomsv!uu3news.netcom.com!ix.netcom.com!netcom.com!vfr750
From: vfr750@netcom.com (Will Hartung)
Subject: Scoping problem??
Message-ID: <vfr750DL7F1u.H7q@netcom.com>
Organization: NETCOM On-line Communication Services (408 261-4700 guest)
Date: Mon, 15 Jan 1996 03:58:41 GMT
Lines: 46
Sender: vfr750@netcom22.netcom.com

Hi all!

I'm a newcomer to Scheme and Lisp, and I'm trying to make a concerted
effort to do all of my recreational programming in one or the other.

I've run into a little problem that seems to make sense to me, but
MacGambit is complaining about it.

Below is the transcript.

: (define (draw-tri a b c)
    (let ((angs (tri a b c)))
        (begin (clear-graphics)
        (position-pen 0 0)
        (draw-line-to (* 10 (* a (cos (car angs)))) 
                      (* 10 (* a (sin (car angs)))))
        (draw-line-to (* 10 c) 0)
        (draw-line-to 0 0))))
#f

: *** ERROR -- Unbound variable: a

1: *** ERROR -- Unbound variable: c

2: #f

2: *** ERROR IN read -- Misplaced ')'

2: *** ERROR IN read -- Misplaced ')'

2: *** ERROR IN read -- Misplaced ')'

2: 

It is pretty clear that it does not like the 'a' and the 'c' in the
two draw-line-to expressions, but I can't understand why. I'd
appreciate some insight as to why MacGambit can't "see" 'a' and 'c'.

I'm pretty sure its not a misplaced (), but I could be wrong.

Thanx!

-- 
Will Hartung - Hermosa Beach, Lower Left Coast.         vfr750@netcom.com
1990 VFR750 - VFR=Very Red    "Ho, HaHa, Dodge, Parry, Spin, HA! THRUST!"
1993 Explorer - Cage? Hell, it's a prison.                    -D. Duck
