What I think makes Gambas hard to use.Edit

The only thing I find hard about Gambas is the lack of good tutorials.

Take the "goto" tutorial for example. I think this it is a very bad example on how to use the goto command.

Why? Because after studying it I still have trouble using the goto command. What would have been better is if the example just showed me how to goto a certain part.

like this:

  • a = print "hello"
  • goto a


  • a = print "hello"
  • b = print "gamabs"
  • goto a then b
  • goto b then a

Edit 10/3/06

First be aware that goto is bad programming practice. It is a holdover from the old days of GWBasic with its line numbers and lack of proper control structures.

Using goto creates code that is hard to follow and debug and lacks logical structure - so called spaghetti code.

That said, goto works like this

goto a


Print "Hello World"


Print "Hello Wicked World"

The output of this will be BOTH print statements because goto simply branches to the defined label and then continues to the end of the sub/function.

Change the goto to 'goto b" and only the second statement prints.

This example will not work in Gambas, but it wasn't meant to, I just wrote this to help you understand what I mean. I think all Gambas tutorials should start with very simple examples and work their way up to advance examples.