[erlang-questions] Help for a newbie...
Loïc Hoguin
essen@REDACTED
Wed May 8 15:34:00 CEST 2013
On 05/08/2013 03:28 PM, Boris Barvish wrote:
> I am passing in a string such as "morning, 1, 2, 3" as the UserEntry and
> simply want to create a variable which holds a list of the tokens. I am
> getting a message from the compiler saying "syntax error before: 'case'.
>
> -module(practicum).
>
> -export([placeorder/1]).
>
> placeorder(UserEntry) ->
> AllTokens = string:tokens(UserEntry, ",").
You want a , at the end of the line there, not a . Expressions are
separated with commas.
--
Loïc Hoguin
Erlang Cowboy
Nine Nines
http://ninenines.eu
More information about the erlang-questions
mailing list