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

Username:   Password: 
 RegisterRegister   
 if error occures...
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
greenapplesodaex




PostPosted: Tue Jun 08, 2004 9:24 pm   Post subject: if error occures...

if error occures, such as int out flow or string left bound less than 1, can i somehow, stop the program from shuting down and jsut skip this part by using "return" or "exit"?? can i detect error in turing before it shuts down and do something to it?
Sponsor
Sponsor
Sponsor
sponsor
Tony




PostPosted: Tue Jun 08, 2004 9:56 pm   Post subject: (No subject)

you'd probably have to error trap that by first checking if the number is small enough to not allow an overflow (such as if you're *=2 then make sure the number is <(maxint/2)

check what kind of bounds you're using for your string...

Just try to get into a habbit of now allowing such events to occur, and if that is out of your control, then error trap that
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
greenapplesodaex




PostPosted: Wed Jun 09, 2004 1:30 pm   Post subject: reply

awww.. poop
aside




PostPosted: Wed Jun 09, 2004 3:18 pm   Post subject: (No subject)

if you can make something that detects error and stop the program before it crashes, then you are good enough to make a program that doesn't crash.
greenapplesodaex




PostPosted: Wed Jun 09, 2004 5:21 pm   Post subject: reply

isnt that what tony just said? Confused Laughing Rolling Eyes
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  [ 5 Posts ]
Jump to:   


Style:  
Search: