Hi Richard,<div><br></div><div>Thanks for your reply. I'm posting this back to the list as I think some of the answers can be useful to others.<br><br>On Tue, 14 May, 2013 at 2:29 AM, Richard A. O'Keefe <ok@cs.otago.ac.nz> wrote:<br>
<blockquote type="cite"><div class="plaintext" style="white-space: pre-wrap;">
On 12/05/2013, at 2:22 AM, Bruno Girin wrote:
<blockquote> Another question from a newbie based on your code above. In this line:
[Time,_|Dishes] = string:tokens(User_Entry, ","),
The way I understand it, Time will point to the first token,
</blockquote>s/point to/be/</div></blockquote><div><br></div>Ah yes, I'm used to object oriented languages where everything is always a point to the actual object :-)<div><br></div><div><br><blockquote type="cite"><div class="plaintext" style="white-space: pre-wrap;">
<blockquote> the second will be dropped (as it maps to _) and Dishes will be the rest of the list. Am I correct?
</blockquote>Yes.
<blockquote>
If yes, did you include _ to reflect the original code where lists:nthtail(AllTokens, 2) would have resulted in Dishes starting at the 3rd token effectively ignoring the 2nd token?
</blockquote>
Yes.</div></blockquote><div><br></div>Good, I'm glad I understand something about Erlang then!</div><div><br></div><div><br><blockquote type="cite"><div class="plaintext" style="white-space: pre-wrap;">
<blockquote> I'm not sure that's what was intended based on the description.
</blockquote>
You may well be right.
<blockquote> Also, would it be sensible to add space as a separator to avoid having them included in tokens?
</blockquote>
Dunno. Ask the original poster. The whole thing looked a bit unfinished,
so it's not clear that at this stage there _is_ a right answer.
</div></blockquote><br></div></div><div>True, I was trying to guess the OP's intent which is never a good thing to do with code.</div><div><br></div><div>Bruno</div><div><br></div>