# \[Help\] Skipping line ? WHY?

**URL:** <https://forum.kirupa.com/t/help-skipping-line-why/316112>\
**Category:** Uncategorized\
**Created:** [November 12, 2010, 2:51pm UTC](https://forum.kirupa.com/t/help-skipping-line-why/316112 "2010-11-12T14:51:41Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![DieByMacro](https://avatars.discourse-cdn.com/v4/letter/d/ebca7d/32.png) [@DieByMacro](https://forum.kirupa.com/u/DieByMacro)\
**Post date:** [November 12, 2010, 2:51pm UTC](https://forum.kirupa.com/t/help-skipping-line-why/316112/1 "2010-11-12T14:51:41Z")

</div>

I got some problems with my code, here is my code:

```auto
public function left_hand_sides(a:String):Array{
			var res:Array = new Array();
			var r:Array = new Array();
			var i:int = 0;
			var j:int = 0;
			var z:int;
			for(i = 0;i < this.Terminal.length;i++){
				for(j = 0;j < this.Terminal*.length;++j){
					z = this.Terminal*[j];
					r.push(z);
				}
				if(r[1] == a){
					res.push(r[0]);
				}
				r = [];
			}
			return res;
		}

```

Assuming this.Terminal is a public array of my class which has 7 elements. Each element has an array. So it look like this:  
 ![](http://img826.imageshack.us/img826/7616/igee17.jpg)

when I debug this piece of code, I find some weird things happened. It didn’t run the way I think it should be. I googled some info about variable scope in AS 3 and find out some interesting info. So I changed it a little bit to make it run. Anyway, it still didn’t run. When I debug line by line, until

```auto
if(r[1] == a)
      res.push(r[0]);

```

So can you guys please point out the mistake for me? That’d be really appreciated.
