doc • diffvb

Differences From Visual Basic

While Gambas is not intended to be a clone of Microsoft Visual Basic, it's still BASIC and there are many similarities between the two languages, and many one-to-one relationships between features.

There are probably more similarities than differences, but you can't simply copy your VB projects over and expect them to compile under Gambas.

The symbol %vb% will sometimes appear on a page in this documentation to indicate that there are notes available on how using the feature described on that page differs from accomplishing the same task in VB, to help those programmers who may be migrating to Gambas from that language.

Non-Language-Specific Differences

Type of file

Visual Basic Gambas
Project definition file .vbp .project (just .project, one per directory)
Module .bas .module
Class file .cls .class
Form definition file .frm .form
Binary resource files .frx Any other file stored in the project directory.

Visual Basic Has It, Gambas Doesn't

Passing arguments by reference is now possible in the development version.

This is now possible in the development version.

That does not work in Gambas. You must do things like that:

'in Gmabas
MyString = "The dog jumps"
MyString = LEFT(MyString, 4) & "fox" & MID(MyString, 8)
PRINT MyString

The fox jumps

This Mid$() syntax is now possible in the development version.

Examples

 Const ADDITION As Integer = 1
 Const SUBSTRACTION As Integer = 2

Gambas Has It, Visual Basic Doesn't

And many many other things... Just add them as you like! :-)

Same Functionality, Different Terminology