Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #39443
| From | Ben Bacarisse <ben.usenet@bsb.me.uk> |
|---|---|
| Newsgroups | comp.lang.javascript |
| Subject | Re: Bug in javascript found |
| Date | 2021-02-09 21:01 +0000 |
| Organization | A noiseless patient Spider |
| Message-ID | <87pn19hs6i.fsf@bsb.me.uk> (permalink) |
| References | <ad443096-b466-4cdc-a0f8-edc0d815fa5en@googlegroups.com> |
Jonas Thörnvall <jonas.thornvall@gmail.com> writes:
> The input alert have not same value as the calcSTR alert.
> And that is also why it not goes into the if clause.
>
> The "Input"+calcSTR is +7
> but the "calcSTR"+calcSTR is +14-7
>
> A string can't just change value so there must be a bug in at least
> Chrome implementation of javascript.
>
> function evalSecondary(calcSTR){
> alert("Input"+calcSTR);
> for(m=0;m<calcSTR.length;m++){
> tempChar=calcSTR.charCodeAt(m);
> //Plus or Minus
> if((tempChar==43|| tempChar==45) && m!=0){
> alert("tempChar "+tempChar+ " M="+m+" calcSTR"+calcSTR);
> operand=calcSTR.charAt(m);
> getSecondaryOps(calcSTR);
> calcSubSecondary(calcSTR);
> }
> }
> }
You need to post a small, complete example that demonstrates the
problem. You are still using what I'd loosely describe as global
variables and that makes you code one giant interconnected web of
potential side-effects.
--
Ben.
Back to comp.lang.javascript | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Bug in javascript found Jonas Thörnvall <jonas.thornvall@gmail.com> - 2021-02-09 12:42 -0800
Re: Bug in javascript found Jonas Thörnvall <jonas.thornvall@gmail.com> - 2021-02-09 12:43 -0800
Re: Bug in javascript found Ben Bacarisse <ben.usenet@bsb.me.uk> - 2021-02-09 21:01 +0000
Re: Bug in javascript found Jonas Thörnvall <jonas.thornvall@gmail.com> - 2021-02-09 13:03 -0800
Re: Bug in javascript found Jonas Thörnvall <jonas.thornvall@gmail.com> - 2021-02-09 13:14 -0800
Re: Bug in javascript found Ben Bacarisse <ben.usenet@bsb.me.uk> - 2021-02-10 02:16 +0000
Re: Bug in javascript found Jonas Thörnvall <jonas.thornvall@gmail.com> - 2021-02-10 01:11 -0800
Re: Bug in javascript found Ben Bacarisse <ben.usenet@bsb.me.uk> - 2021-02-10 11:20 +0000
Re: Bug in javascript found Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2021-02-14 00:52 +0100
Re: Bug in javascript found Jonas Thörnvall <jonas.thornvall@gmail.com> - 2021-02-13 16:32 -0800
Re: Bug in javascript found John G Harris <niam@jghnorth.org.uk.invalid> - 2021-02-14 10:22 +0000
Re: Bug in javascript found Silvio <silvio@internet.com> - 2021-02-14 10:38 +0100
csiph-web