# For loop

**URL:** <https://forum.kirupa.com/t/for-loop/329070>\
**Category:** Uncategorized\
**Created:** [July 18, 2012, 2:36am UTC](https://forum.kirupa.com/t/for-loop/329070 "2012-07-18T02:36:37Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![LOLFlash](https://avatars.discourse-cdn.com/v4/letter/l/ea666f/32.png) [@LOLFlash](https://forum.kirupa.com/u/LOLFlash)\
**Post date:** [July 18, 2012, 2:36am UTC](https://forum.kirupa.com/t/for-loop/329070/1 "2012-07-18T02:36:37Z")

</div>

Hi  
I found one example of spell Checker. it works but I can’t get what is for loop doing??  
for ( ; ; ) is it like while(true)

```auto
private function checkText():void {
            var wordPattern:RegExp =/\b\w+\b/; // match next word...
            var inputValue:String = inputText.text;
            var offset:int, curPos:int;
            
            for ( ; ; ) {
                var res:Array = inputValue.match( wordPattern); // lookup word by word....
                if ( res == null ) break;
                if ( !sp.checkWord(res[0]) ) {
                    offset = inputText.text.length-inputValue.length;
                    curPos = inputValue.indexOf(res[0]);
                    var currentRange:TextRange = new TextRange(inputText, false, offset+ curPos, offset+ curPos+res[0].length); // mark mispelled word.
                    currentRange.color = "red";
                }
                inputValue = inputValue.substr(inputValue.indexOf(res[0])+ res[0].length);
            }
        }

```
