Home > doc > diffvb 
 fr de es it nl pl pt pt_BR mk sq ca hu cs tr ar fa id vi ko ja ru zh zh_TW eo
Previous  Next  Edit  Rename  Undo  Refresh  Search  Administration  
Documentation
History
 
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 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.

'in VB
MyString = "The dog jumps"
MID(MyString, 5, 3) = "fox"
PRINT MyString

The fox jumps
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.

Example

 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