gah15920722 wrote:
> I want to know when I use a  for statement,how many ;should I use?
> What if I only use two statements?
> Why?

Why are you asking this question (i.e. what caused you to ask this in 
the first place)?  You should use as many for-loops as is needed. 
However, if you start nesting too deeply (e.g. 4 or more deep), then 
there is probably something wrong with the design.  Although, depending 
on the scenario, it could be just fine - you would want to run some 
performance tests and maybe move the inner loops into function calls to 
help make the code more readable.  Functions incur some slight overhead 
- but there are performance tricks like 'inline' to help alleviate the 
problem and they help organize your code.

-- 
Thomas Hruska
CubicleSoft President
Ph: 517-803-4197

*NEW* MyTaskFocus 1.1
Get on task.  Stay on task.

http://www.CubicleSoft.com/MyTaskFocus/

Reply via email to