<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">
<br><div><div>On Sep 4, 2007, at 10:42 , Lone Wolf wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0; ">I have been trying this statement:<br>2> [java | python] = [1, 2, 3, 4, 5, 6].<br>But I got the following error:<br>=ERROR REPORT==== 4-Sep-2007::17:45:07 ===<br>Error in process <0.33.0> with exit value: {{badmatch,[1,2,3,4,5,6]},[{erl_eval,<br>expr,3}]}<br>Why?<br>How to read Erlang errors? they are really obfuscated.</span></blockquote><br></div><div><span class="Apple-tab-span" style="white-space:pre"> </span>I wouldn't say they're obfuscated. This is actually a quite useful error. It's showing you the value you were trying to pattern match against and telling you your match failed.<br class="webkit-block-placeholder"></div><div><br class="webkit-block-placeholder"></div><div><span class="Apple-tab-span" style="white-space:pre"> </span>Regarding your statement, it's not clear what you expect it to do. If you capitalize java and python (i.e. make them variables instead of atoms), then it'd leave you with the values 1 and [2,3,4,5,6] for Java and Python respectively. Otherwise, it's just going to tell you that that list doesn't equal a two element list where the first element is the atom ``java'' and the second is the atom ``python.''</div><div><br></div><div> <span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><div>-- </div><div>Dustin Sallings</div><br class="Apple-interchange-newline"></span> </div><br></body></html>