What do you mean by "limit"? The predicate must be an expression. You can't write
1 2 3
if (for (int i = 0; i < 10; i++) j += i;){
//...
}
Other than that, you can put anything you want in the predicate. But do note that excessively complex predicates are often an indication that the code can be restructured and simplified.