Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 HELP!!!! -Implementation restriction -Block nesting too deep
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
zjlzjl




PostPosted: Wed Jun 08, 2005 3:02 am   Post subject: HELP!!!! -Implementation restriction -Block nesting too deep

Implementation restriction -Block nesting too deep

why is it in my program??? how can i solve it??????


my code is too long, can any one download the attchment and fix it for me? pliz. thankyou. very much.!


bowing.......

btw, u wont be able to run the program because of missing picutre
if u need the picz, Msn me, or email -xjayq@hotmail.com
Sponsor
Sponsor
Sponsor
sponsor
Drakain Zeil




PostPosted: Wed Jun 08, 2005 6:11 am   Post subject: (No subject)

Perhaps you should post the code?
c0bra54




PostPosted: Wed Jun 08, 2005 8:40 am   Post subject: (No subject)

yeh.. what are oyu talking about..
Cervantes




PostPosted: Wed Jun 08, 2005 4:56 pm   Post subject: (No subject)

It sounds like you've got nested loops/for loops/if statements/case constructs to the nine hells and back again! It would seem that Turing does not like that so much. You should not like that too much, either. Having nested loops/conditional statements forever and ever makes things get way, WAY too complicated. For most programs, you only NEED one main loop (sure, there are smaller loops inside there, but they are small).
I suspect you're doing something like "if you click this button, then [code goes into another loop which is almost as big as the previous one]". If it's something like that, you need to find another way to code your program. Believe me, it will make things easier.

If that's not the case, feel free to ignore my post. Smile
c0bra54




PostPosted: Wed Jun 08, 2005 10:06 pm   Post subject: (No subject)

or maybe there are like 8 for loops, nested checking 8 different dimesions of an array.. that is MASSIVELY complex, 8 dimensions!

or it is like cervantes says..
zjlzjl




PostPosted: Thu Jun 09, 2005 7:03 pm   Post subject: (No subject)

Cervantes wrote:
It sounds like you've got nested loops/for loops/if statements/case constructs to the nine hells and back again! It would seem that Turing does not like that so much. You should not like that too much, either. Having nested loops/conditional statements forever and ever makes things get way, WAY too complicated. For most programs, you only NEED one main loop (sure, there are smaller loops inside there, but they are small).
I suspect you're doing something like "if you click this button, then [code goes into another loop which is almost as big as the previous one]". If it's something like that, you need to find another way to code your program. Believe me, it will make things easier.

If that's not the case, feel free to ignore my post. Smile


woah i guess ur rit, im a newbe man, cud u help me take a look at my program and fix it? i appreciate ....
c0bra54




PostPosted: Thu Jun 09, 2005 7:56 pm   Post subject: (No subject)

ok well umm yeh.. your problem is DEFFINITLY to many nested for loops.. if you clikc the handy indent buttton it will show you jsut how bad it is... note.. that's REALLY bad..

word of advice, it's great that you are using for loops, but most of the time you do not need so many stacked inside, usually nested for's deal with multidimensional arrays (least when i use them) or when checking say for example every y pixel, from x=5 to x=10 or sumthing to that effect... what you want to do instead is a kind of if elsif satements.. these are golden.. they basically say that if a statement is true then do the following, the elsif is espeicially good because it will not let two things happen from the same if elsif statment...

yeh.. for loops = good.. that many = omg i run away
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 7 Posts ]
Jump to:   


Style:  
Search: