Home  |   Notes  |   Languages  |   Programs  |   Homework

Re: cs3304 ?s

New Message Reply About this list Date view Thread view Subject view Author view

Stephen Edwards (edwards@CS.VT.EDU)
Fri, 14 Sep 2001 08:58:02 -0400


Message-ID:  <3BA1FEDA.A145372@cs.vt.edu>
Date:         Fri, 14 Sep 2001 08:58:02 -0400
From: Stephen Edwards <edwards@CS.VT.EDU>
Subject:      Re: cs3304 ?s

> Mark Shapiro wrote:
>
> I got the correct output:
> ; Loading "bmi.scm" - done
> ;Value: main
> When loading the scheme script you said to test. But how do we actually RUN
> the program (have it ask to enter your height, weight, etc).

If you take a look at the file, you'll see that it defines a function called
"main" that takes no arguments. To run it, at the interpreter's prompt,
just enter the following S-expression:

    (main)

The interpreter will then evaluate this expression (which means calling
the function "main"), running the program.

> Second, in program 1, in the grammar. it looks like the only way to
> reference <variable> is through
> "<expression> --> <variable> = <expression>" so how would we
> reference a variable when it appears in a line such as 16 / D

This was a mistake in the grammar in the assignment that I briefly
mentioned in class. I've fixed the program assignment so it includes
referring to a <variable> as another alternative for <factor>.

Thanks for pointing out that the program assignment still had this error.

                                -- Steve

--
Stephen Edwards            604 McBryde Hall          Dept. of Computer Science
e-mail      : edwards@cs.vt.edu           U.S. mail: Virginia Tech (VPI&SU)
office phone: (540)-231-5723                         Blacksburg, VA  24061-0106
-------------------------------------------------------------------------------


New Message Reply About this list Date view Thread view Subject view Author view

Home  |   Notes  |   Languages  |   Programs  |   Homework
copyright © 2001 Virginia Tech, ALL RIGHTS RESERVED
Class site maintained by Stephen H. Edwards <edwards@cs.vt.edu>