What you guys suggest solves the problem of returning multiple values. Since I havent provided any context, my original problem still exists. Sorry about that.<div><br></div><div>This is what I was trying to do,</div><div>
<br></div><div>(if (condition?) </div><div>     (stmt1))</div><div><br></div><div>(if (condition?)</div><div>     (stmt2)</div><div>     (stmt3))</div><div>   </div><div>In the first if condition(stmt1), I have no else condition. Since this is not allowed, I used (cond ...) which returns #&lt;void&gt; by default when there&#39;s no else. This #&lt;void&gt; is being somehow copied to the returned list.</div>
<div><div><br></div><div>So I tried clubbing multiple return statements in cond stmt because I had no else condition.</div><div><br></div><div>Basically, I dont want to execute an else stmt or return multiple values. I just want to return &quot;stmt1&quot; if condition satisfies and dont do anything if false. No returning #&lt;void&gt; or anything.</div>
<div><br></div><div>Am I making any sense ? if yes, is it possible ? </div><div><br></div><div><br></div><div><br><div class="gmail_quote">On Sat, Apr 30, 2011 at 6:28 AM, Richard Cleis <span dir="ltr">&lt;<a href="mailto:rcleis@mac.com">rcleis@mac.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div style="word-wrap:break-word">You can return more than one by forming a list, or by using something like (values val-1 val-2 ...)<div>
<br></div><div>rac<br><div><br><div><div><div></div><div class="h5"><div>On Apr 29, 2011, at 11:45 PM, nikhil wrote:</div><br></div></div><blockquote type="cite"><div><div></div><div class="h5"><p style="margin-top:0px;margin-right:0px;margin-bottom:1em;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;border-top-width:0px;border-right-width:0px;border-bottom-width:0px;border-left-width:0px;border-style:initial;border-color:initial;font-size:14px;vertical-align:baseline;background-color:transparent;clear:both;word-wrap:break-word;font-family:Arial, &#39;Liberation Sans&#39;, &#39;DejaVu Sans&#39;, sans-serif;border-collapse:collapse;line-height:18px">

Hi,</p><p style="margin-top:0px;margin-right:0px;margin-bottom:1em;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;border-top-width:0px;border-right-width:0px;border-bottom-width:0px;border-left-width:0px;border-style:initial;border-color:initial;font-size:14px;vertical-align:baseline;background-color:transparent;clear:both;word-wrap:break-word;font-family:Arial, &#39;Liberation Sans&#39;, &#39;DejaVu Sans&#39;, sans-serif;border-collapse:collapse;line-height:18px">

I am new to Racket so please bear with me. I am trying to print multiple expressions in &quot;cond&quot; statement as below.</p><div style="margin-top:0px;margin-right:0px;margin-bottom:1em;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;border-top-width:0px;border-right-width:0px;border-bottom-width:0px;border-left-width:0px;border-style:initial;border-color:initial;vertical-align:baseline;background-color:transparent;clear:both;word-wrap:break-word">

<br></div><p style="margin-top:0px;margin-right:0px;margin-bottom:1em;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;border-top-width:0px;border-right-width:0px;border-bottom-width:0px;border-left-width:0px;border-style:initial;border-color:initial;vertical-align:baseline;background-color:transparent;clear:both;word-wrap:break-word">

<font face="Arial, &#39;Liberation Sans&#39;, &#39;DejaVu Sans&#39;, sans-serif"><span style="border-collapse:collapse;font-size:14px;line-height:18px">(let ((var `(make))</span></font></p><p style="margin-top:0px;margin-right:0px;margin-bottom:1em;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;border-top-width:0px;border-right-width:0px;border-bottom-width:0px;border-left-width:0px;border-style:initial;border-color:initial;vertical-align:baseline;background-color:transparent;clear:both;word-wrap:break-word">

<font face="Arial, &#39;Liberation Sans&#39;, &#39;DejaVu Sans&#39;, sans-serif"><span style="border-collapse:collapse;font-size:14px;line-height:18px">        (exp &#39;(1 2)))</span></font></p><p style="margin-top:0px;margin-right:0px;margin-bottom:1em;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;border-top-width:0px;border-right-width:0px;border-bottom-width:0px;border-left-width:0px;border-style:initial;border-color:initial;vertical-align:baseline;background-color:transparent;clear:both;word-wrap:break-word">

<font face="Arial, &#39;Liberation Sans&#39;, &#39;DejaVu Sans&#39;, sans-serif"><span style="border-collapse:collapse;font-size:14px;line-height:18px">    (cond</span></font></p><p style="margin-top:0px;margin-right:0px;margin-bottom:1em;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;border-top-width:0px;border-right-width:0px;border-bottom-width:0px;border-left-width:0px;border-style:initial;border-color:initial;vertical-align:baseline;background-color:transparent;clear:both;word-wrap:break-word">

<font face="Arial, &#39;Liberation Sans&#39;, &#39;DejaVu Sans&#39;, sans-serif"><span style="border-collapse:collapse;font-size:14px;line-height:18px">      [(number? 2) `(hi ,var)</span></font></p><p style="margin-top:0px;margin-right:0px;margin-bottom:1em;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;border-top-width:0px;border-right-width:0px;border-bottom-width:0px;border-left-width:0px;border-style:initial;border-color:initial;vertical-align:baseline;background-color:transparent;clear:both;word-wrap:break-word">

<font face="Arial, &#39;Liberation Sans&#39;, &#39;DejaVu Sans&#39;, sans-serif"><span style="border-collapse:collapse;font-size:14px;line-height:18px">                              `(bye ,exp)]))</span></font></p><p style="margin-top:0px;margin-right:0px;margin-bottom:1em;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;border-top-width:0px;border-right-width:0px;border-bottom-width:0px;border-left-width:0px;border-style:initial;border-color:initial;vertical-align:baseline;background-color:transparent;clear:both;word-wrap:break-word">

<font face="Arial, &#39;Liberation Sans&#39;, &#39;DejaVu Sans&#39;, sans-serif"><span style="border-collapse:collapse;font-size:14px;line-height:18px"><br></span></font></p><div><br></div><p style="margin-top:0px;margin-right:0px;margin-bottom:1em;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;border-top-width:0px;border-right-width:0px;border-bottom-width:0px;border-left-width:0px;border-style:initial;border-color:initial;vertical-align:baseline;background-color:transparent;clear:both;word-wrap:break-word">

<font face="Arial, &#39;Liberation Sans&#39;, &#39;DejaVu Sans&#39;, sans-serif"><span style="border-collapse:collapse;font-size:14px;line-height:18px">But only the &quot;bye&quot; statement is returned/printed on the screen. The first &quot;hi&quot; is not evaluated at all. How do I return/print both ?</span></font></p>
<p style="margin-top:0px;margin-right:0px;margin-bottom:1em;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;border-top-width:0px;border-right-width:0px;border-bottom-width:0px;border-left-width:0px;border-style:initial;border-color:initial;vertical-align:baseline;background-color:transparent;clear:both;word-wrap:break-word">

<font face="Arial, &#39;Liberation Sans&#39;, &#39;DejaVu Sans&#39;, sans-serif"><span style="border-collapse:collapse;font-size:14px;line-height:18px">Thanks</span></font></p><p style="margin-top:0px;margin-right:0px;margin-bottom:1em;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;border-top-width:0px;border-right-width:0px;border-bottom-width:0px;border-left-width:0px;border-style:initial;border-color:initial;vertical-align:baseline;background-color:transparent;clear:both;word-wrap:break-word">

<font face="Arial, &#39;Liberation Sans&#39;, &#39;DejaVu Sans&#39;, sans-serif"><span style="border-collapse:collapse;font-size:14px;line-height:18px"><br></span></font></p><p style="margin-top:0px;margin-right:0px;margin-bottom:1em;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;border-top-width:0px;border-right-width:0px;border-bottom-width:0px;border-left-width:0px;border-style:initial;border-color:initial;vertical-align:baseline;background-color:transparent;clear:both;word-wrap:break-word">

<font face="Arial, &#39;Liberation Sans&#39;, &#39;DejaVu Sans&#39;, sans-serif"><span style="border-collapse:collapse;font-size:14px;line-height:18px">Nik</span></font></p></div></div>
_________________________________________________<br>  For list-related administrative tasks:<br>  <a href="http://lists.racket-lang.org/listinfo/users" target="_blank">http://lists.racket-lang.org/listinfo/users</a></blockquote>
</div><br></div></div></div></blockquote></div><br></div></div>