> "\b" =:= [8].<br>true<br><br>they are exactly the same thing, just different ways to display<br><br><div class="gmail_quote">On 19 September 2011 16:44, Amir <span dir="ltr"><<a href="mailto:amir_fire_2005@yahoo.com">amir_fire_2005@yahoo.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div><div style="color:#000;background-color:#fff;font-family:arial, helvetica, sans-serif;font-size:12pt"><div><span><br>
</span></div><div><br></div><div style="font-size:12pt;font-family:arial, helvetica, sans-serif"><div style="font-size:12pt;font-family:'times new roman', 'new york', times, serif"><div><div style="color:rgb(0, 0, 0);background-color:rgb(255, 255, 255);font-size:12pt;font-family:arial, helvetica, sans-serif">
<div style="font-size:12pt;font-family:arial, helvetica, sans-serif"><span>No I am not trying to print them. </span></div><div style="font-family:arial, helvetica, sans-serif;font-size:12pt"><span>I want the function to return the list containing a number </span></div>
<div style="font-size:12pt;font-family:arial, helvetica, sans-serif"><span><br></span></div><div style="font-size:12pt;font-family:arial, helvetica, sans-serif"><span>The r</span><span>equirement says:</span></div><div style="font-size:12pt;font-family:arial, helvetica, sans-serif">
<br></div><div style="font-size:12pt;font-family:arial, helvetica, sans-serif">the function should return [Number]</div><div style="font-size:12pt;font-family:arial, helvetica, sans-serif">For example [8] but the shell shows me "\b"</div>
<div style="font-size:12pt;font-family:arial, helvetica, sans-serif"><br></div><div><font size="3">As a result of </font>previous replied<font size="3">, when the function returns "\b" instead of [8], I should imagine the requirement is covered, but it just shows that way?</font></div>
<div><font size="3"><br></font></div><div><font size="3"><br></font></div><div><font size="3"><br></font></div><div><font size="3">---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------</font></div>
<div><font size="3"><br></font></div><div><font size="3"><span style="font-family:'Times New Roman'"><div style="background-color:rgb(255, 255, 255);color:rgb(0, 0, 0);padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;margin-top:8px;margin-right:0px;margin-bottom:0px;margin-left:12px;font-family:arial, helvetica, sans-serif;display:block;font-size:12pt">
<div><br></div><div style="font-family:arial, helvetica, sans-serif;font-size:12pt"><div style="font-family:'times new roman', 'new york', times, serif;font-size:12pt"><div class="im"><font face="Arial" size="2">----- Forwarded Message -----<br>
<b><span style="font-weight:bold">From:</span></b> Chris Hicks <<a href="mailto:silent_vendetta@hotmail.com" target="_blank">silent_vendetta@hotmail.com</a>><br><b><span style="font-weight:bold">To:</span></b> <a href="mailto:bob@redivi.com" target="_blank">bob@redivi.com</a>; <a href="mailto:amir_fire_2005@yahoo.com" target="_blank">amir_fire_2005@yahoo.com</a><br>
<b><span style="font-weight:bold">Cc:</span></b> <a href="mailto:erlang-questions@erlang.org" target="_blank">erlang-questions@erlang.org</a><br><b><span style="font-weight:bold">Sent:</span></b> Monday, September 19, 2011 5:39 PM<br>
<b><span style="font-weight:bold">Subject:</span></b> RE: [erlang-questions] Lists!!<br></font><br></div><div><div dir="ltr"><div class="im">If you are trying to print the list, take a look at the options for the <a rel="nofollow" href="http://erldocs.com/R14B03/stdlib/io.html?i=2&search=io:for#format/1" target="_blank">io:format/1</a> module. If you are going to be performing mathematical calculations on the different items in the list, the Erlang system will automatically treat them as numbers, because that's what they are. The issue you are seeing is due to the fact that there is no string type in Erlang, simply lists of ASCII codes corresponding to the characters and the shell makes the assumption that you have input a string, in this case. It is just a formatting issue, not a change of the underlying structure.<br>
<br></div><div><div class="im">> Date: Mon, 19 Sep 2011 08:33:51 -0700<br>> From: <a href="mailto:bob@redivi.com" target="_blank">bob@redivi.com</a><br>> To: <a href="mailto:amir_fire_2005@yahoo.com" target="_blank">amir_fire_2005@yahoo.com</a><br>
> CC: <a href="mailto:erlang-questions@erlang.org" target="_blank">erlang-questions@erlang.org</a><br>> Subject: Re: [erlang-questions] Lists!!<br>> <br></div><div><div></div><div class="h5">> These lists are indistinguishable, this is just how the shell displays<br>
> lists that could be interpreted as strings. "abc" =:=
[97,98.99].<br>> <br>> On Mon, Sep 19, 2011 at 8:32 AM, Amir <<a href="mailto:amir_fire_2005@yahoo.com" target="_blank">amir_fire_2005@yahoo.com</a>> wrote:<br>> ><br>> ><br>> > Hey Everyone,<br>
> > Here is the question:<br>> > If you try to enter this on Erlang shell [97,98,99].<br>> > you will get the following answer: "abc"<br>> > But I need the original list to be returned, is there any solution ?<br>
> > By the way,<br>> > init:script_id().<br>> > {"OTP APN 181 01","R14B03"}<br>> ><br>> ><br>> ><br>> > _______________________________________________<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" target="_blank">http://erlang.org/mailman/listinfo/erlang-questions</a><br>
> ><br>> ><br>> _______________________________________________<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" target="_blank">http://erlang.org/mailman/listinfo/erlang-questions</a><br></div></div></div></div></div><div class="hm"><br></div></div><div class="hm"><div style="font-family:'times new roman', 'new york', times, serif;font-size:12pt">
<br></div><div style="font-family:'times new roman', 'new york', times, serif;font-size:12pt"><br></div><div style="font-family:'times new roman', 'new york', times, serif;font-size:12pt"><br>
</div></div></div></div></span></font></div><div style="font-size:12pt;font-family:arial, helvetica, sans-serif"><div style="font-size:12pt;font-family:times, serif"><font face="Arial" size="2"><div class="hm"><hr size="1">
<b><span style="font-weight:bold">From:</span></b> Bob Ippolito <<a href="mailto:bob@redivi.com" target="_blank">bob@redivi.com</a>><br><b><span style="font-weight:bold">To:</span></b> Amir <<a href="mailto:amir_fire_2005@yahoo.com" target="_blank">amir_fire_2005@yahoo.com</a>><br>
<b><span style="font-weight:bold">Cc:</span></b> "<a href="mailto:erlang-questions@erlang.org" target="_blank">erlang-questions@erlang.org</a>"
<<a href="mailto:erlang-questions@erlang.org" target="_blank">erlang-questions@erlang.org</a>><br><b><span style="font-weight:bold">Sent:</span></b> Monday, September 19, 2011 5:33 PM</div><div class="im"><br><b><span style="font-weight:bold">Subject:</span></b> Re: [erlang-questions] Lists!!<br>
</div></font><div class="im"><br>These lists
are indistinguishable, this is just how the shell displays<br>lists that could be interpreted as strings. "abc" =:= [97,98.99].<br><br>On Mon, Sep 19, 2011 at 8:32 AM, Amir <<a rel="nofollow" href="mailto:amir_fire_2005@yahoo.com" target="_blank">amir_fire_2005@yahoo.com</a>> wrote:<br>
><br>><br>> Hey Everyone,<br>> Here is the question:<br>> If you try to enter this on Erlang shell [97,98,99].<br>> you will get the following answer: "abc"<br>> But I need the original list to be returned, is there any solution ?<br>
> By the way,<br>> init:script_id().<br>> {"OTP APN 181 01","R14B03"}<br>><br>><br>><br>> _______________________________________________<br>> erlang-questions mailing list<br>
> <a rel="nofollow" href="mailto:erlang-questions@erlang.org" target="_blank">erlang-questions@erlang.org</a><br>>
<a rel="nofollow" href="http://erlang.org/mailman/listinfo/erlang-questions" target="_blank">http://erlang.org/mailman/listinfo/erlang-questions</a><br>><br>><br><br><br></div></div></div></div></div><br><br></div>
</div></div></div><br>_______________________________________________<br>
erlang-questions mailing list<br>
<a href="mailto:erlang-questions@erlang.org">erlang-questions@erlang.org</a><br>
<a href="http://erlang.org/mailman/listinfo/erlang-questions" target="_blank">http://erlang.org/mailman/listinfo/erlang-questions</a><br>
<br></blockquote></div><br>