The selective receive with a bound Msg worked like a charm.<br>Thanks for the help!!<br><br>Aggelos<br><br><div class="gmail_quote">On Fri, Jan 4, 2013 at 10:03 PM, Tony Rogvall <span dir="ltr"><<a href="mailto:tony@rogvall.se" target="_blank">tony@rogvall.se</a>></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">Yes, of course :-)<div><br></div><div>Not sure what I was drinking...</div><span class="HOEnZb"><font color="#888888"><div>

<br></div><div>/Tony</div></font></span><div><div><div class="h5"><br><div><div>On 4 jan 2013, at 20:55, Erik Søe Sørensen <<a href="mailto:eriksoe@gmail.com" target="_blank">eriksoe@gmail.com</a>> wrote:</div><br>
<blockquote type="cite">
[forgot to write the list]<br><br>That would be<br><div class="gmail_quote">  receive TheMsg when TheMsg=:=Msg -> ok end<br>(or shorter but perhaps less clear:<br>  receive Msg -> ok end<br>where Msg is already bound)<br>


assuming of course that you won't be trying to remove the non-first copy of a specific message - but given that you say you're trying to emulate the receive expression, and that doesn't allow it, then the above should be what you want.<br>



<br><div class="gmail_quote">2013/1/4 Aggelos Giantsios <span dir="ltr"><<a href="mailto:aggelgian@gmail.com" target="_blank">aggelgian@gmail.com</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">


<div><div>
Happy New Year to everyone!<br><br>I am trying to simulate the 'receive' expression behaviour.<br>I access the process message queue with erlang:process_info(self(), messages).<br>Assuming I have selected a message Msg which is at position k in the message list and have safely stored it in a variable,<br>






is there a way to manually remove Msg from the process message queue?<br><br>Thanks,<br>Aggelos<br><br>
<br></div></div><div>_______________________________________________<br>
erlang-questions mailing list<br>
<a href="mailto:erlang-questions@erlang.org" target="_blank">erlang-questions@erlang.org</a><br>
<a href="http://erlang.org/mailman/listinfo/erlang-questions" target="_blank">http://erlang.org/mailman/listinfo/erlang-questions</a><br>
<br></div></blockquote></div><br>
</div><br>
_______________________________________________<br>erlang-questions mailing list<br><a href="mailto:erlang-questions@erlang.org" target="_blank">erlang-questions@erlang.org</a><br><a href="http://erlang.org/mailman/listinfo/erlang-questions" target="_blank">http://erlang.org/mailman/listinfo/erlang-questions</a><br>

</blockquote></div><br></div></div><div class="im"><div>
<span style="text-indent:0px;letter-spacing:normal;font-variant:normal;text-align:-webkit-auto;font-style:normal;font-weight:normal;line-height:normal;border-collapse:separate;text-transform:none;font-size:medium;white-space:normal;font-family:Helvetica;word-spacing:0px"><div>

<span style="color:rgb(51,51,51);font-family:Geneva,Arial,Helvetica,sans-serif;font-size:12px">"Installing applications can lead to corruption over time. </span><span style="color:rgb(51,51,51);font-family:Geneva,Arial,Helvetica,sans-serif;font-size:12px">Applications gradually write over each other's libraries, partial upgrades occur, user and system errors happen, and minute changes may be unnoticeable and difficult to fix"</span></div>

<div><span style="color:rgb(51,51,51);font-family:Geneva,Arial,Helvetica,sans-serif;font-size:12px"><br></span></div></span><br>
</div>
<br></div></div></div><br>_______________________________________________<br>
erlang-questions mailing list<br>
<a href="mailto:erlang-questions@erlang.org">erlang-questions@erlang.org</a><br>
<a href="http://erlang.org/mailman/listinfo/erlang-questions" target="_blank">http://erlang.org/mailman/listinfo/erlang-questions</a><br>
<br></blockquote></div><br>