# Why does this produce a syntax error?

**URL:** https://forum.kirupa.com/t/why-does-this-produce-a-syntax-error/126715
**Category:** Uncategorized
**Created:** [October 26, 2004, 6:00pm UTC](https://forum.kirupa.com/t/why-does-this-produce-a-syntax-error/126715 "2004-10-26T18:00:51Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![jonesin](https://avatars.discourse-cdn.com/v4/letter/j/ec9cab/32.png) [@jonesin](https://forum.kirupa.com/u/jonesin)
#### Post date: [October 26, 2004, 6:00pm UTC](https://forum.kirupa.com/t/why-does-this-produce-a-syntax-error/126715/1 "2004-10-26T18:00:51Z")

</div>

```php
for(j=i+1;j<nodez.length;j++){
   nodeB = nodez[j];
   dx = nodeB._x – nodeA._x;
   dy = nodeB._y – nodeA._y;
   dist = Math.sqrt(dx*dx+dy*dy);

```

syntax error is on dx = …, and dy = …

any idears? i got this from bit-101, trying to get into mathmatics…
