Placid Report post Posted July 28, 2004 Teranoz, u need to learn an OO language...... Procedural sucks! 10 print hello 20 goto 10 30 begin .......the good ole' days! Share this post Link to post Share on other sites
fred_penner Report post Posted July 28, 2004 I agree. You need help. Share this post Link to post Share on other sites
teranoz Report post Posted July 28, 2004 Lol. Yeah, Visual Basic is not real OO programming. You example is also not very OO. But concerning Visual Basic I know what I am talking about. I have even a Micro$oft certification for that one..... Share this post Link to post Share on other sites
Guest Report post Posted July 29, 2004 the whole point of my post was mocking procedural programming (i.e. basic and yes, vb). Im a Java Cert, so i know about OO programming...... Secondly, get rid of your microsoft cert, its embarrassing ...only kidding :wink: Share this post Link to post Share on other sites
Grum Report post Posted July 29, 2004 I wonder WTH is so much better about OO? I mean, what do you think is more concise and clear, this (procedural): ++++++++[>+>++++<<-]>++>[>++>+>++++>+++<<<<-]>++++++++.>>>+++++.+++++++..+++.<<.<+++++++++++++++.>>>.+++.------.--------. or this (object oriented) #include <string> #include <iostream> class Hello { public: Hello (std::string msg) : _msg (msg) {} ~Hello () {} std::string message () const { return _msg; } void print () const { std::cout << message (); } private: std::string _msg; }; int main () { Hello *hello = new Hello ("Hello World"); hello->print (); return 0; } Share this post Link to post Share on other sites
teranoz Report post Posted July 29, 2004 You ment the posting about the Errorhandler ? Thats very common in VB. In all subs and functions in VB you can use a GOTO label command, but this is only used for jumping to an errorhandler (if you want to do good vb programming) There are 4 ways in VB to handle an error : 1. Not (not really an option, makes the program crash) 2. On Error Resume Next (might mess up the rest) 3. On Error Resume (serious errors will force you to Ctrl-Alt-Del) 4. On Error Goto Label (catch the error) So until there is no other option in VB I stick to #4 Share this post Link to post Share on other sites
Guest Report post Posted July 29, 2004 then again, what about errors that you cannot forsee? learn OO, its tastier... Share this post Link to post Share on other sites
Grum Report post Posted July 29, 2004 Yes indeed, OO programming will save the whales, bring world peace, and solve the energy problem. :roll: Share this post Link to post Share on other sites
teranoz Report post Posted July 29, 2004 then again, what about errors that you cannot forsee? learn OO, its tastier... They will also go to the errorhandler. You can eliminate some errors in an errorhandler, by doing Select Case Err.Number Case 13 'code to handle errornumber 13 Case -212243656 (or whatever) 'code to handle errornumber -212243656 Case else 'all other errors, mostly writing to logfile and a resume next End Select Yes indeed, OO programming will save the whales, bring world peace, and solve the energy problem Yeah, Set Whale.saved = True; CreateObject("WorldPeace") Set Energy.Problem = Nothing Share this post Link to post Share on other sites
Entropy Report post Posted July 30, 2004 WTF is this post doing in the Help Me section? Anyway, OOP is teh sukc, procedural is teh r0x! Share this post Link to post Share on other sites
teranoz Report post Posted July 30, 2004 WTF is this post doing in the Help Me section? No idea, I did not start it, but needed to reply it. Should be in either offtopic or programming, so why don't you move it there. Share this post Link to post Share on other sites
Placid Report post Posted August 2, 2004 sorry it was I that created the thread. it was a reply to a help me topic.......nice to see it moved here......hmmm........nice....... .......... ...........im bored at work...... Share this post Link to post Share on other sites
Evil8 Report post Posted August 8, 2004 *knows nothing of programming but interested in it* Share this post Link to post Share on other sites