• Post Reply Bookmark Topic Watch Topic
  • New Topic

looping problem  RSS feed

 
catherine matthews
Ranch Hand
Posts: 78
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


numtokens is about 100, wanted words is an array of 100 words,and i declared index =0
the algorithm is working properly.... i think there is some mistake in my looping....
this is the oupit which i am getting......
Method 116 - start at 33 and ends at 42
Method 116 - start at 0 and ends at 43
Method 116 - start at 0 and ends at 44
Method 116 - start at 0 and ends at 45
Method 116 - start at 0 and ends at 46
Method 116 - start at 0 and ends at 47
Method 116 - start at 0 and ends at 48
Method 116 - start at 0 and ends at 49
Method 116 - start at 0 and ends at 50
Method 116 - start at 51 and ends at 54
Method 116 - start at 0 and ends at 55
Method 116 - start at 0 and ends at 56
Method 116 - start at 0 and ends at 57
Method 116 - start at 0 and ends at 58
Method 116 - start at 59 and ends at 62
Method 116 - start at 0 and ends at 63
Method 116 - start at 0 and ends at 64
Method 116 - start at 0 and ends at 65
Method 116 - start at 0 and ends at 66
Method 116 - start at 0 and ends at 67
Method 116 - start at 68 and ends at 72

why do i get the start at 0? i cannot understand.... please help...
i donot want to execute the method which has 0 values....
just the ones where both the starts at and ends at has values....
where did i go wrong?
 
Scott Selikoff
author
Bartender
Posts: 4093
21
Eclipse IDE Flex Google Web Toolkit
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
One tip (still looking through your code to understand it) is avoid this:

method[index++][1] = ...

The ++ inside of a setter can be confusing and error prone. Better to put it on a separate line for clarity.
[ June 13, 2006: Message edited by: Scott Selikoff ]
 
Scott Selikoff
author
Bartender
Posts: 4093
21
Eclipse IDE Flex Google Web Toolkit
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Another thought... close keeps growing and growing and never gets decremented?
 
catherine matthews
Ranch Hand
Posts: 78
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks Scott ,

But can you or anyone tell me the logic behind the 0's i'm getting?
Why do i get that?
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!