Computer Science Canada Am i using Class's correctly? |
Author: | TokenHerbz [ Fri Aug 11, 2006 3:44 am ] | ||
Post subject: | Am i using Class's correctly? | ||
Am i using the class correctly?
|
Author: | TheOneTrueGod [ Fri Aug 11, 2006 7:54 am ] |
Post subject: | |
Aye, you are -- Everything the class does is handled inside the class, so there is no overflow into the program. Good job ![]() |
Author: | Delos [ Fri Aug 11, 2006 12:45 pm ] | ||||
Post subject: | Re: Am i using Class's correctly? | ||||
TokenHerbz wrote:
I would, however, stay away from any sort of hard-coded values like these that could be more usefully made to be dynamic. Occaisionally, you will run into values that need to be hardcoded, but these particular ones would work better being parameters:
Good stuff, keep up the work with classes. |
Author: | TokenHerbz [ Sat Aug 12, 2006 7:12 am ] |
Post subject: | |
If an error does occur in turing, how do you get turing to notice it, and not crash, so you are able to change the variable? Iv'e tried tests myself, and it seems even if i dont display the variables, if an error occures thats the end of the program, is there a way to bypass that? |
Author: | Cervantes [ Sat Aug 12, 2006 8:14 am ] |
Post subject: | |
Error handling in Turing is extremely limited. Check the Error module in Turing Help. You can do a few things to trip errors and such, but nothing to rescue an error, as I can see. |
Author: | [Gandalf] [ Sat Aug 12, 2006 1:10 pm ] |
Post subject: | |
Ha! I outdo Mr. Cervantes yet again! ![]() TokenHerbz, the error handling in Turing is done using the handler keyword. Try looking it up in the documentation, since we don't really have a tutorial on it. |
Author: | TokenHerbz [ Sat Aug 12, 2006 1:57 pm ] |
Post subject: | |
Perhaps then you'd wish to write a tut on this Gandalf? It wouldn't just benifit myself... ![]() |
Author: | [Gandalf] [ Sat Aug 12, 2006 8:19 pm ] |
Post subject: | |
Ahh... I don't especially feel like it at the moment, and it would require looking back on more Turing. Maybe next summer? ![]() Well, I'll try and remember your request. |