bug or feature?

Serge Aleynikov serge@REDACTED
Tue Apr 18 13:15:17 CEST 2006


Could anyone explain why matches #5 and #6 below fail?  I didn't find in 
documentation a limitation of not being able to specify a variable as 
the first argument of the '++' transform.

Eshell V5.4.13  (abort with ^G)
(a@REDACTED)1> Prefix = "200".
"200"
(a@REDACTED)2> Suffix = "100".
"100"
(a@REDACTED)3> "200" ++ "100" = "200100".
"200100"
(a@REDACTED)4> "200" ++ Suffix = "200100".
"200100"
(a@REDACTED)5> Prefix ++ "100" = "200100".
** 1: illegal pattern **
(a@REDACTED)6> Prefix ++ Suffix = "200100".
** 1: illegal pattern **
(a@REDACTED)7> Prefix ++ Suffix.
"200100"
(a@REDACTED)9> "200" ++ Suffix = v(7).
"200100"

Regards,

Serge



More information about the erlang-questions mailing list