<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">
<br><div><div>On Feb 17, 2009, at 8:43 PM, aditya shukla wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">I have a doubt the concept of defining structures.In htdp chapter 6  its given as<br><br> A <small>S</small><small>T</small><small>R</small><small>U</small><small>C</small><small>T</small><small>U</small><small>R</small><small>E</small> <small>D</small><small>E</small><small>F</small><small>I</small><small>N</small><small>I</small><small>T</small><small>I</small><small>O</small><small>N</small> <a name="node_idx_432"></a>is, as the term says, a new form of definition. Here is DrScheme's definition of <code class="scheme"><span class="variable">posn: i have modified the example here<br><br></span></code><pre class="scheme">(<span class="keyword">define-struct</span> <span class="variable">entry</span> (<span class="variable">name</span> <span class="variable">zip</span> <span class="variable">phone</span>))</pre></blockquote><div><br></div><div>A __structure definition__ adds a class of values (lots and lots of them) to the ever-expanding universe of values. </div><div><br></div><blockquote type="cite"><pre class="scheme">Now a few lines later it says <br><br><br>If we give the structure a name,<br><br>(<span class="keyword">define</span> <span class="variable">phonebook</span> (<span class="builtin">make-entry</span> <span class="keyword">'</span><span class="variable">PeterLee</span> <span class="selfeval">15270</span> <span class="keyword">'</span><span class="variable">606-7771</span>))</pre></blockquote><div><br></div><div>A __structure instance__ is a specific value from the class of values that some structure definition added to the universe. </div><div><br></div><div>Here you gave it a name: phonebook (a horrible name, because you're dealing with just one person). </div><div><br></div><div>-- Matthias</div><div><br></div><blockquote type="cite"><pre class="scheme"><span class="Apple-style-span" style="font-size: 12px; white-space: normal; -webkit-text-stroke-width: -1; ">Now my question here is  phonebook the name of the structure  or it is a structure of type entry?</span></pre></blockquote><div><br></div><div>The name _phonebook_ stands for the value (make-entry ...). To which class of values does it belong? </div><div><br></div><div><br></div><br><blockquote type="cite"><br><br>Aditya<br><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">_________________________________________________</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><span class="Apple-converted-space">  </span>For list-related administrative tasks:</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><span class="Apple-converted-space">  </span><a href="http://list.cs.brown.edu/mailman/listinfo/plt-scheme">http://list.cs.brown.edu/mailman/listinfo/plt-scheme</a></div> </blockquote></div><br></body></html>