<html><body><div style="color:#000; background-color:#fff; font-family:arial, helvetica, sans-serif;font-size:12pt"><div><span><br></span></div><div><br></div><div style="font-size: 12pt; font-family: arial, helvetica, sans-serif; "><div style="font-size: 12pt; font-family: 'times new roman', 'new york', times, serif; "><font size="2" face="Arial"><hr size="1"><b><span style="font-weight:bold;">From:</span></b> Steve Graham <jsgrahamus@yahoo.com><br><b><span style="font-weight: bold;">To:</span></b> Gambit List <Gambit-list@iro.umontreal.ca><br><b><span style="font-weight: bold;">Sent:</span></b> Monday, August 22, 2011 6:37 AM<br><b><span style="font-weight: bold;">Subject:</span></b> Re: [gambit-list] REPL, values and '#'<br></font><br><div id="yiv1109429563"><div style="color: rgb(0, 0, 0); background-color: rgb(255, 255, 255); font-size: 12pt; font-family: arial, helvetica, sans-serif; "><div style="font-size: 12pt; font-family: arial,
 helvetica, sans-serif; "><span><br></span></div><div style="font-size: 12pt; font-family: arial, helvetica, sans-serif; "><br></div><div style="font-family: arial, helvetica, sans-serif; "><div style="font-size: 12pt; font-family: times, serif; "><font size="2" face="Arial"><hr size="1"><b><span style="font-weight:bold;">From:</span></b> Marc Feeley <feeley@iro.umontreal.ca><br><b><span style="font-weight:bold;">To:</span></b> Adrien Piérard <pierarda@iro.umontreal.ca><br><b><span style="font-weight:bold;">Cc:</span></b> Gambit List <gambit-list@iro.umontreal.ca><br><b><span style="font-weight:bold;">Sent:</span></b> Monday, August 22, 2011 6:32 AM<br><b><span style="font-weight:bold;">Subject:</span></b> Re: [gambit-list] REPL, values and
 '#'<br></font><br><br>On 2011-08-22, at 2:09 AM, Adrien Piérard wrote:<br><br>> Hello,<br>> <br>> Given that '#' is supposed to be a placeholder for the latest returned<br>> value, I'd expect<br>> <br>>> (values 1 2)<br>> 1<br>> 2<br>>> #<br>> 1<br>> 2<br>> <br>> instead of<br>> <br>>> (values 1 2)<br>> 1<br>> 2<br>>> #<br>> 2<br>> <br>> Or at least, the returned value to be the first one of multiple<br>> values, not the last.<br>> <br>> I think that it's not common to use # and values together in the REPL,<br>> but I find the above behaviour not very natural.<br><br>Personally I find it more natural, and simpler, to think of each result printed by the REPL being added to the REPL history in the order printed. That's why # always refers to the last result printed, which will be the last value if multiple values were the result of the interaction. For
 example:<br><br>> 777<br>777<br>> (values 111 222)<br>111<br>222<br>> #<br>222<br>> 777<br>777<br>> (values 111 222)<br>111<br>222<br>> ##<br>111<br>> 777<br>777<br>> (values 111 222)<br>111<br>222<br>> ###<br>777<br><br>Marc</div><div style="font-size: 12pt; font-family: times, serif; " class="yiv1109429563yui_3_2_0_16_131399786921157"><br></div><div style="font-size: 12pt; font-family: times, serif; " class="yiv1109429563yui_3_2_0_16_131399786921157">---</div><div style="font-size: 12pt; font-family: times, serif; " class="yiv1109429563yui_3_2_0_16_131399786921157"><br></div><div style="font-size: 12pt; font-family: times, serif; " class="yiv1109429563yui_3_2_0_16_131399786921157">On my Windows 7x64 system I get the following:</div><div style="font-size: 12pt; font-family: times, serif; " class="yiv1109429563yui_3_2_0_16_131399786921157"><br></div><div class="yiv1109429563yui_3_2_0_16_131399786921157"><div
 class="yiv1109429563yui_3_2_0_16_131399786921157"><br></div><div class="yiv1109429563yui_3_2_0_16_131399786921157">CHICKEN</div><div class="yiv1109429563yui_3_2_0_16_131399786921157">(c)2008-2011 The Chicken Team</div><div class="yiv1109429563yui_3_2_0_16_131399786921157">(c)2000-2007 Felix L. Winkelmann</div><div class="yiv1109429563yui_3_2_0_16_131399786921157">Version 4.6.5</div><div class="yiv1109429563yui_3_2_0_16_131399786921157">windows-mingw32-x86 [ manyargs dload ptables ]</div><div class="yiv1109429563yui_3_2_0_16_131399786921157">compiled Fri 03/25/2011  on hermes (MinGW)</div><div class="yiv1109429563yui_3_2_0_16_131399786921157"><br></div><div class="yiv1109429563yui_3_2_0_16_131399786921157">#;1> (values 111 222)</div><div class="yiv1109429563yui_3_2_0_16_131399786921157">111</div><div class="yiv1109429563yui_3_2_0_16_131399786921157">222</div><div class="yiv1109429563yui_3_2_0_16_131399786921157">; 2 values</div><div
 class="yiv1109429563yui_3_2_0_16_131399786921157">#;2> #</div><div class="yiv1109429563yui_3_2_0_16_131399786921157">111</div><div class="yiv1109429563yui_3_2_0_16_131399786921157">#;3> </div><div class="yiv1109429563yui_3_2_0_16_131399786921157"><br></div><div class="yiv1109429563yui_3_2_0_16_131399786921157"><br></div><div class="yiv1109429563yui_3_2_0_16_131399786921157">Steve</div><div class="yiv1109429563yui_3_2_0_16_131399786921157"><br></div>---</div><div class="yiv1109429563yui_3_2_0_16_131399786921157"><br></div><div class="yiv1109429563yui_3_2_0_16_131399786921157">How embarrassing - Wrong list.</div><div class="yiv1109429563yui_3_2_0_16_131399786921157"><br></div><div class="yiv1109429563yui_3_2_0_16_131399786921157"><br></div><div class="yiv1109429563yui_3_2_0_16_131399786921157">Steve</div><div class="yiv1109429563yui_3_2_0_16_131399786921157"><br></div></div></div></div></div></div></div></body></html>