Path: csiph.com!weretis.net!feeder4.news.weretis.net!feeder1.news.weretis.net!news.solani.org!.POSTED!not-for-mail From: Thomas 'PointedEars' Lahn Newsgroups: comp.lang.javascript Subject: Re: passing a set of numbers to a function Date: Fri, 29 Jan 2016 03:57:49 +0100 Organization: PointedEars Software (PES) Lines: 41 Message-ID: <7925147.1Px1IdcSyd@PointedEars.de> References: <19679ed0-c594-4f7e-817c-a72bd5c10411@googlegroups.com> Reply-To: Thomas 'PointedEars' Lahn Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8Bit X-Trace: solani.org 1454036270 337 eJwFwYEBwCAIA7CXQGnBc7YK/59ggk2nMggGBrMNJd00HtW2ayQ+T/zqmpvikq9a4c3TPfEAD7sQ2w== (29 Jan 2016 02:57:50 GMT) X-Complaints-To: abuse@news.solani.org NNTP-Posting-Date: Fri, 29 Jan 2016 02:57:50 +0000 (UTC) User-Agent: KNode/4.14.2 X-User-ID: eJwFwYERADEIArCZrAWv47wK+4/wCZLBqUvwwrAfY3HomHQ81bDdXFh1THwuhZRPDs9qnNW73c2Ti/oBgboXXA== Cancel-Lock: sha1:OsdLg9rFcneKtacr3mz/W0aA6+w= X-NNTP-Posting-Host: eJwFwQkRAEEIAzBNHWhZ5PAc/iVcQhM04aKcx6uduVAzjvGNtu1lIIfeFnVvkQsVurCW+gE16BGi Xref: csiph.com comp.lang.javascript:29466 Matheus Suffi wrote: > I'm in trouble , I need to send a set of numbers to a function , for > example: ' 01599874425 ' . That is _not_ a set of numbers; it is, at best, a set of (decimal) digits making up *one* number. > however, when the set of numbers is sent to a function, if the first > character is 0, it is deleted . No, if as posted it most certainly is not. Either you have a strange idea of what it means to "send" something "to a function" (in proper language, you _pass_ a _value_ as an _argument_ to a function) or something in the function code lets the leading zero disappear from the passed value. Nobody can tell for sure until you post both the expression in which you call the function, and the function code (passing numbers as strings just for the sake of it is a bad idea; do not listen to wannabes). You did not even say why you want to do this. (If this is homework, do your own homework. We can assist you if you are stuck, but it is rather unlikely that we do your homework for you.) > I do not want that to happen ,is there a javascript function or conversion > to not let that happen ? 1. There is no “javascript”, see the ECMAScript Support Matrix (URI below). 2. 3. In English, punctuation is usually not preceded by whitespace. You would be well-advised to post in an easily readable way because otherwise busy, knowledgable people tend to skip postings that are not easily readable. See also the FAQ (URI below). -- PointedEars FAQ: | SVN: Twitter: @PointedEars2 | ES Matrix: Please do not cc me. / Bitte keine Kopien per E-Mail.