<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On May 12, 2012, at 8:35 AM, saad bashir wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div dir="ltr">Dear Matthias,<div><br></div><div>Thank you for replying to me. I am sure this is laughably basic for you.</div></div></blockquote><div><br></div><div>It is basic for me, but there's nothing laughable. </div><div><br></div><br><blockquote type="cite"><div dir="ltr"><div>I got what you wrote. I know string-ith extracts the letter. My question is how to use it. I have tried various ways of writing both in the def and interaction sections but have not worked out. Even consulting the Helpdesk has not helped as it does not tell me how to use the fucntion.</div>
<div><br></div><div>Sorry if I am being very thick. I really want to do it right.</div><div><br></div></div></blockquote><div><br></div><div><br></div><div>If you have a DrRacket in front of you, does it say </div><div><br></div><div> "Welcome to DrRacket, version 5.2.1"</div><div> Language: Beginning Student.</div><div><br></div><div>in the Interactions WIndow? If not, you need to switch languages with the Language menu. </div><div><br></div><div>Once you have switched languages, click run. Then try these interactions: </div><div><br></div><div>> (string-ith "hello world" 0)</div><div><div>"h"</div><div>> (string-ith "hello world" 1)</div><div>"e"</div><div>> (string-ith "hello world" 2)</div><div>"l"</div><div>> (string-ith "hello world" 3)</div><div>"l"</div><div>> </div></div><div><br></div><div>Please let me know which step went wrong previously. -- Matthias</div><div><br></div><div><br></div><div><br></div><div><br></div><br><blockquote type="cite"><div dir="ltr"><div>Saad<br><br><div class="gmail_quote">On Fri, May 11, 2012 at 11:47 PM, Matthias Felleisen <span dir="ltr"><<a href="mailto:matthias@ccs.neu.edu" target="_blank">matthias@ccs.neu.edu</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
The beginning of section 2.1.3 looks like this:<br>
<br>
<br>
> All other operations concerning strings consume or produce data other than strings. Here are some examples:<br>
> • string-length consumes a string and produces a (natural) number;<br>
><br>
> • string-ith consumes a string s and extracts the one-character substring located at the ith position (counting from 0); and<br>
><br>
> • number->string consumes a number and produces a string.<br>
><br>
> Also look up substring and find out what it does.<br>
<br>
Which function do you think extracts a "letter" from a string? [[You can follow the links for the function names. Perhaps it is easier to read the docs.]]<br>
<span class="HOEnZb"><font color="#888888"><br>
-- Matthias<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
<br>
<br>
<br>
On May 11, 2012, at 4:22 PM, saad bashir wrote:<br>
<br>
> I am back again. I had a basic inquiry and your help got me started.<br>
><br>
> My problem is as follows:<br>
><br>
> I have just started to work through 2Htdp (i.e. the second edition) that you had guided me to. Having gone through the prologue I am now on the second chapter, "Fixed-size data." But have got stuck almost at the start. I have successfully done the first two exercises but have hit a road block on exercise 3 (section 2.1.3 "Mixing it up"). I do not know what instruction to use to insert or extract a letter from the ith position. I think I am doing something wrong when trying to look up things in Helpdesk. Please help.<br>
><br>
> Saad<br>
><br>
> On Fri, Apr 27, 2012 at 8:32 PM, Danny Yoo <<a href="mailto:dyoo@cs.wpi.edu">dyoo@cs.wpi.edu</a>> wrote:<br>
> On Fri, Apr 27, 2012 at 11:27 AM, saad bashir <<a href="mailto:bashir.saad@gmail.com">bashir.saad@gmail.com</a>> wrote:<br>
> > Your help was great. Things are working now. And a great thank you for<br>
> > leading me to the 2d edition of How to Design Programs. I had not known<br>
> > about it.<br>
><br>
><br>
> Glad to hear that it's working for you now! Please feel free to<br>
> continue to ask questions on the mailing list; we'll be happy to help.<br>
><br>
</div></div><div class="HOEnZb"><div class="h5">> ____________________<br>
> Racket Users list:<br>
> <a href="http://lists.racket-lang.org/users" target="_blank">http://lists.racket-lang.org/users</a><br>
<br>
</div></div></blockquote></div><br></div></div>
</blockquote></div><br></body></html>