[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.javascript

Possible error in the MDN Guide?

ram

6/13/2014 5:33:00 PM

I have found this definition of floating-point literal syntax
on the MDN page »JavaScript/Guide/Values,_variables,_and_literals«:

[(+|-)][digits][.digits][(E|e)[(+|-)]digits]

. I immediately became suspicious! Could this really be true?
So I devised a Web page to check the syntax in Mozilla Firefox!

<!DOCTYPE HTML><html><meta charset="UTF-8">
<head><title>Main</title><script></script></head><body><script>
2..constructor.prototype.show = function(){ return "[" + this + "]"; }
document.writeln( -2..show() );
</script></body></html>

The output was:

NaN

. As far as I understand it, this shows that »-« is treated
as an operator and not as a part of the floating-point literal.
Otherwise, I would have expected the output

[-2]

.

4 Answers

Steve

8/29/2012 2:26:00 PM

0

On Wed, 29 Aug 2012 14:20:29 +0000 (UTC), 3159 Dead <dead@gone.com>
wrote:

>On Tue, 28 Aug 2012 17:41:18 -0700, MattB wrote:
>
>> On Tue, 28 Aug 2012 18:13:06 -0600, Yoorghis@Jurgis.net wrote:
>>
>>>On Tue, 28 Aug 2012 10:23:38 -0700, MattB <trdell1234@gmail.com> wrote:
>>>
>>>>>>Obama is not Lazy just not a good President. Obama is half white
>>>>>>remember. I am part American Indian.
>>>>>
>>>>>a) Nothing you've ever posted backs up any claim that "Obama is not a
>>>>>good president". Your entire opposition is predicated on him being a
>>>>>minority.
>>>>
>>>>Please show a in context post from me saying so? I will wait.
>>>
>>>Show anything that proves he's a "bad president".
>>
>> Selling guns to drug lords for one.
>
>Which he had nothing to do with.

His underlings had to do with it. The buck stops with Obama.

> His record to present for another.
>
>Vague Tea Party boilerplate cant from a moron who is stuck for any real
>specifics.
>>
>>
>>>>>b) Being "half white" is a inference that miscegenation produced
>>>>>Obama, a MAJOR hatred of whites.
>>>>
>>>>That makes no sense at all.
>>>
>>>Not to a fucking racist like you.
>>
>> I'm part American Indian does that mean I hate American Indians. you
>> make little sense.
>>
>>
>>>>>c) You being "indian" is nothing more than a self-proven example of
>>>>>why you're in the category of Thomas, Sowell, and other that support
>>>>>racist ideologies against your better interests.
>>>>
>>>>Well my ancestors were here first you are free to return to Africa any
>>>>time you choose.
>>>
>>>??? what are you smoking?
>>
>> Sorry you are the Meth user not me.
>>>
>>>
>>>>>>You are the one that has claimed all Democrats are minorities. In my
>>>>>>area that isn't true most are white or mutts like me. Many Blacks in
>>>>>>my are Republicans and great people. Dems and Republicans get along
>>>>>>just fine.
>>>>>
>>>>>A VERY FEW blacks are republicans---and they fall into a category that
>>>>>has long been classed as "traitors" to their own interests.
>>>>
>>>>Minorities is not just Blacks. American Indians, Asians, Latinos and
>>>>more are minorities. Blacks are just one group. You are to focused
>>>>because of you racism.
>>>
>>>The amount of money given to native americans is staggering.
>>
>> Maybe but what was done to them and taken from them is so much more than
>> done to Blacks.
>>>
>>>>There are many countries in the world where Blacks are the majority.
>>>>Feel free to leave and see how they are doing.
>>>
>>>THere are not countries that passed the Civil Rights Act, Voter Rights
>>>Act, have a constitution predicated on rights coming from a higher
>>>power.
>>
>> So. You attack the second Amendment all the time. No one can have guns
>> but gangs to you and the Black Klan.
>>>
>>>All of the above are under attack by your idiots
>>
>> No not at all. Then again you won't be satisfied until you can take all
>> you did not work for. I owe you nothing.
>>
>>
>>>Didn't you know that?

TRMatt

8/29/2012 7:33:00 PM

0

On Wed, 29 Aug 2012 14:20:29 +0000 (UTC), 3159 Dead <dead@gone.com>
wrote:

>On Tue, 28 Aug 2012 17:41:18 -0700, MattB wrote:
>
>> On Tue, 28 Aug 2012 18:13:06 -0600, Yoorghis@Jurgis.net wrote:
>>
>>>On Tue, 28 Aug 2012 10:23:38 -0700, MattB <trdell1234@gmail.com> wrote:
>>>
>>>>>>Obama is not Lazy just not a good President. Obama is half white
>>>>>>remember. I am part American Indian.
>>>>>
>>>>>a) Nothing you've ever posted backs up any claim that "Obama is not a
>>>>>good president". Your entire opposition is predicated on him being a
>>>>>minority.
>>>>
>>>>Please show a in context post from me saying so? I will wait.
>>>
>>>Show anything that proves he's a "bad president".
>>
>> Selling guns to drug lords for one.
>
>Which he had nothing to do with.

So you claim. 2009- 2011: Operation Fast and Furious Who was
President in 2009? That is when the program was changed to a more
liberal bent.

""On October 26, 2009, a teleconference was held at the Department of
Justice in Washington, D.C. to discuss U.S. strategy for combating
Mexican drug cartels. Participating in the meeting were Deputy
Attorney General David W. Ogden, Assistant Attorney General Lanny A.
Breuer, ATF Director Kenneth E. Melson, Drug Enforcement
Administration (DEA) Administrator Michele Leonhart, Director of the
Federal Bureau of Investigation Robert Mueller and the top federal
prosecutors in the Southwestern border states. They decided on a
strategy to identify and eliminate entire arms trafficking networks
rather than low-level buyers. Those at the meeting did not suggest
using the "gunwalking" tactic, but ATF supervisors would soon use it
in an attempt to achieve the desired goals. The effort, beginning in
November, would come to be called Operation Fast and Furious for the
successful film franchise, because some of the suspects under
investigation operated out of an auto repair store and street raced.""

""The tactic of letting guns walk, rather than interdicting them and
arresting the buyers, led to controversy within the ATF.[5][37] As the
case continued, several members of Group VII, including John Dodson
and Olindo Casa, became increasingly upset at the tactic of allowing
guns to walk. Their standard Project Gunrunner training was to follow
the straw purchasers to the hand-off to the cartel buyers, then arrest
both parties and seize the guns. But according to Dodson, they watched
guns being bought illegally and stashed on a daily basis, while their
supervisors, including David Voth and Hope MacAllister, prevented the
agents from intervening.""

So you see Obama did change the way this operation was done and
decided to let the guns "Walk" and the drug lords keep them.

Then we have Holder withholding information and Obama using executive
privilege to hide evidence.

How many have died because of that stupidity.

>
> His record to present for another.
>
>Vague Tea Party boilerplate cant from a moron who is stuck for any real
>specifics.

BS The USA is not benefiting by his Presidency. Obama is a total
failure as a President and Leader.

>>
>>
>>>>>b) Being "half white" is a inference that miscegenation produced
>>>>>Obama, a MAJOR hatred of whites.
>>>>
>>>>That makes no sense at all.
>>>
>>>Not to a fucking racist like you.
>>
>> I'm part American Indian does that mean I hate American Indians. you
>> make little sense.
>>
>>
>>>>>c) You being "indian" is nothing more than a self-proven example of
>>>>>why you're in the category of Thomas, Sowell, and other that support
>>>>>racist ideologies against your better interests.
>>>>
>>>>Well my ancestors were here first you are free to return to Africa any
>>>>time you choose.
>>>
>>>??? what are you smoking?
>>
>> Sorry you are the Meth user not me.
>>>
>>>
>>>>>>You are the one that has claimed all Democrats are minorities. In my
>>>>>>area that isn't true most are white or mutts like me. Many Blacks in
>>>>>>my are Republicans and great people. Dems and Republicans get along
>>>>>>just fine.
>>>>>
>>>>>A VERY FEW blacks are republicans---and they fall into a category that
>>>>>has long been classed as "traitors" to their own interests.
>>>>
>>>>Minorities is not just Blacks. American Indians, Asians, Latinos and
>>>>more are minorities. Blacks are just one group. You are to focused
>>>>because of you racism.
>>>
>>>The amount of money given to native americans is staggering.
>>
>> Maybe but what was done to them and taken from them is so much more than
>> done to Blacks.
>>>
>>>>There are many countries in the world where Blacks are the majority.
>>>>Feel free to leave and see how they are doing.
>>>
>>>THere are not countries that passed the Civil Rights Act, Voter Rights
>>>Act, have a constitution predicated on rights coming from a higher
>>>power.
>>
>> So. You attack the second Amendment all the time. No one can have guns
>> but gangs to you and the Black Klan.
>>>
>>>All of the above are under attack by your idiots
>>
>> No not at all. Then again you won't be satisfied until you can take all
>> you did not work for. I owe you nothing.
>>
>>
>>>Didn't you know that?




http://en.wikipedia.org/wiki/ATF_gunwalki...

ram

6/13/2014 5:46:00 PM

0

ram@zedat.fu-berlin.de (Stefan Ram) writes:
>[(+|-)][digits][.digits][(E|e)[(+|-)]digits]

It seems that some (older?) editions of »JavaScript: The
Definitive Guide« contain the prefix »[(+|-)]« at the start
of the the floating-point literal syntax, but other (more
recent?) editions do not do so anymore.

Thomas 'PointedEars' Lahn

6/13/2014 6:13:00 PM

0

Stefan Ram wrote:

> 2..constructor.prototype.show = function(){ return "[" + this + "]"; }
> document.writeln( -2..show() );
> [â?¦]
>
> The output was:
>
> NaN
>
> . As far as I understand it, this shows that »-« is treated
> as an operator and not as a part of the floating-point literal.
> Otherwise, I would have expected the output
>
> [-2]

Correct.

> .

Please learn proper punctuation.

--
PointedEars
FAQ: <http://PointedEars.... | SVN: <http://PointedEars.de...
Twitter: @PointedEars2 | ES Matrix: <http://PointedEars.de/es-...
Please do not Cc: me. / Bitte keine Kopien per E-Mail.