<div dir="ltr"><div>Hi!</div><div><br></div><div>Could it be so that you are trying to solve the problem in the wrong place? State enter actions are good for example starting a timer, but I think it is illogical to change the state.</div><div>It sound to me like you could do so pattern matching, maybe in conjunction with some guards in the your state function clauses and if your conditions are meet maybe</div><div>all that clause does is to change state.</div><div><br></div><div>Regards Ingela Erlang/OTP team - Ericsson AB<br></div><div><br></div><div> <br></div><div><div class="gmail_extra"><br><div class="gmail_quote">2018-06-12 10:31 GMT+02:00 Frans Schneider <span dir="ltr"><<a href="mailto:fchschneider@gmail.com" target="_blank">fchschneider@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class=""><br>
<br>
On 06/12/2018 10:06 AM, Raimo Niskanen wrote:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
I agree. State enter calls were introduced to allow code to be run when a<br>
state is entered, without having to duplicate that code at every state exit<br>
from the previous state. It is a feature existing in other state machine<br>
description languages e.g OpenBSD's ifstated.<br>
<br>
</blockquote></span>
This is the exact reason for bringing up the whole issue. And sometimes, that requires a next_state NewState.<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br><span class="HOEnZb"><font color="#888888">
</font></span></blockquote><span class="HOEnZb"><font color="#888888">
<br>
Frans</font></span><div class="HOEnZb"><div class="h5"><br>
______________________________<wbr>_________________<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" rel="noreferrer" target="_blank">http://erlang.org/mailman/list<wbr>info/erlang-questions</a><br>
</div></div></blockquote></div><br></div></div></div>