<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=us-ascii" http-equiv=Content-Type>
<META name=GENERATOR content="MSHTML 9.00.8112.16421"></HEAD>
<BODY>
<DIV dir=ltr align=left><SPAN class=537493016-22052011><FONT size=2
face="Courier New">Add a line like:</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=537493016-22052011><FONT size=2
face="Courier New"></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=537493016-22052011><FONT size=2
face="Courier New">(bake "apple")</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=537493016-22052011><FONT size=2
face="Courier New"></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=537493016-22052011><FONT size=2
face="Courier New">The define form defines a procedure, but nothing happens
untill that procedure is called.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=537493016-22052011><FONT size=2
face="Courier New">Jos</FONT></SPAN></DIV><BR>
<BLOCKQUOTE
style="BORDER-LEFT: #000000 2px solid; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; MARGIN-RIGHT: 0px"
dir=ltr>
<DIV dir=ltr lang=en-us class=OutlookMessageHeader align=left>
<HR tabIndex=-1>
<FONT size=2 face=Tahoma><B>From:</B> users-bounces@racket-lang.org
[mailto:users-bounces@racket-lang.org] <B>On Behalf Of </B>Carolyn
Oates<BR><B>Sent:</B> 22 May 2011 18:18<BR><B>To:</B>
users@racket-lang.org<BR><B>Subject:</B> [racket] Printing and doing something
does neither - why?<BR></FONT><BR></DIV>
<DIV></DIV>
<DIV
style="BACKGROUND-COLOR: #fff; FONT-FAMILY: arial, helvetica, sans-serif; COLOR: #000; FONT-SIZE: 10pt">
<DIV>
<DIV><FONT class=Apple-style-span size=2
face="arial, helvetica, sans-serif">Hi,</FONT></DIV>
<DIV><FONT class=Apple-style-span size=2 face="arial, helvetica, sans-serif">I
am wanting to both print something and do something.</FONT></DIV>
<DIV><FONT class=Apple-style-span size=2 face="arial, helvetica, sans-serif">I
found an example in the Racket guide p.20 sec.2.2.1</FONT></DIV>
<DIV><FONT class=Apple-style-span size=2
face="arial, helvetica, sans-serif">Only nothing comes back in the
interactions.</FONT></DIV>
<DIV><FONT class=Apple-style-span size=2
face="arial, helvetica, sans-serif">It runs fine - no errors, but appears to
do nothing.</FONT></DIV>
<DIV><FONT class=Apple-style-span size=2
face="arial, helvetica, sans-serif"><BR></FONT></DIV>
<DIV><FONT class=Apple-style-span size=2
face="arial, helvetica, sans-serif">Both printf and string-append are suppose
to be in racket and racket/base.</FONT></DIV>
<DIV><FONT class=Apple-style-span size=2
face="arial, helvetica, sans-serif">Any ideas?</FONT></DIV>
<DIV><FONT class=Apple-style-span size=2
face="arial, helvetica, sans-serif">Thanks, Carolyn</FONT></DIV>
<DIV><FONT class=Apple-style-span size=2
face="arial, helvetica, sans-serif"><BR></FONT></DIV>
<DIV><FONT class=Apple-style-span size=2
face="arial, helvetica, sans-serif">The code: (using Racket
ver.5.1.1)</FONT></DIV>
<DIV><FONT class=Apple-style-span size=2
face="arial, helvetica, sans-serif">#lang racket</FONT></DIV>
<DIV><FONT class=Apple-style-span size=2
face="arial, helvetica, sans-serif">(require racket/base)</FONT></DIV>
<DIV><FONT class=Apple-style-span size=2
face="arial, helvetica, sans-serif"><BR></FONT></DIV>
<DIV><FONT class=Apple-style-span size=2
face="arial, helvetica, sans-serif">(define (bake flavor)</FONT></DIV>
<DIV><FONT class=Apple-style-span size=2
face="arial, helvetica, sans-serif">(printf "pre-heating
oven...\n")</FONT></DIV>
<DIV><FONT class=Apple-style-span size=2
face="arial, helvetica, sans-serif">(string-append flavor "
pie"))</FONT></DIV>
<DIV
style="FONT-FAMILY: arial, helvetica, sans-serif; FONT-SIZE: 10pt"><BR></DIV></DIV></DIV></BLOCKQUOTE></BODY></HTML>