Hi,<div><br></div><div>I'm trying to send some strings using the format function in LISP to a sockets but always I obtain NIL</div><div><br></div><div>I'm using this function:</div><div><br></div><div><div><span class="Apple-tab-span" style="white-space:pre"> </span>(defun sockets_fun()</div>
<div><span class="Apple-tab-span" style="white-space:pre">              </span>(WITH-OPEN-STREAM (socket (SOCKET:SOCKET-CONNECT 49729 "localhost"))</div><div><span class="Apple-tab-span" style="white-space:pre">               </span>(let ((*standard-output* socket))</div>
<div><span class="Apple-tab-span" style="white-space:pre">              </span>(format socket "The color is ~A" "red")</div><div><span class="Apple-tab-span" style="white-space:pre">          </span>(force-output socket)</div>
<div><span class="Apple-tab-span" style="white-space:pre">              </span>(finish-output nil)</div><div><span class="Apple-tab-span" style="white-space:pre">  </span>)))</div></div><div><br></div><div>But always I obtain NIL in the socket</div>
<div><br></div><div>Instead of that function I've tried to use this another function:</div><div><br></div><div><div>(defun geetings()</div><div><span class="Apple-tab-span" style="white-space:pre">             </span>(print "hi"))</div>
</div><div><br></div><div>and works fine, appears hi in the socket</div><div><br></div><div>Why there are problems with sockets with the format function?</div><div><br></div><div>Thanks</div><div><br></div><div><br></div>