jbskaggs ha scritto: > I am not saying goto isnt needed at all- just that to do what he is doing it > isn't. Furthermore too many goto's create spaghetti code which becomes > really hard to follow. :) > > > But I do get what your saying and I have used goto's the same way- though > not in a while. For me it was when I began to think less sequentially and > more interconnectedly that my code became clearer and my need for goto's > became less. And it was hard for me to overcome my habit of: > > 10 input x > 20 if x = 0 then goto 40 > 30 goto 10 > 40 print "yeah" > and so on... > > I seriously had a hard time grasping that OO was pseudo nonsequential! > I think that GOTOs have nothing to do with OO programming, but instead they relate to "structured programming". In C and Pascal (and many many others), which are structured, you can totally avoid GOTOs, if you want. But, as Nando says, sometimes GOTOs are clearer that while-do-loop-if-elseif-elseif and so on. The real thing is to have *both* structures and GOTOs; if either is missing, then the language is poor.
Regards, Doriano ------------------------------------------------------------------------------ Stay on top of everything new and different, both inside and around Java (TM) technology - register by April 22, and save $200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco. 300 plus technical and hands-on sessions. Register today. Use priority code J9JMT32. http://p.sf.net/sfu/p _______________________________________________ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user