Skip to main content

Gambas--GAMBAS Almost Means BASic

Gambas is the name of an object-oriented dialect of the BASIC programming language, as well as the integrated development environment that accompanies it. Designed to run on Linux and other Unix-like computer operating systems, its name is a recursive acronym for Gambas Almost Means Basic.Gambas is also the word for prawns in the Spanish and Portuguese languages, from which the project's logos are derived.
Gambas was developed by the French programmer Benoît Minisini, with its first release coming in 1999. Benoît had grown up with the BASIC language, and decided to make a free software development environment that could quickly and easily make programs with user interfaces.
Ckeck whether Gambus is installed if not enter these commands one by one.
sudo add-apt-repository ppa: shrimp-team / gambas3
sudo apt-get update
sudo apt-get install gambas3
Know more about Gambas here

Developing applications in Gambas

Only will take a few minutes to build your first application in Gambas. The graphic user interface (GUI) will be quickly created by drawing on the form widgets like text boxes or command buttons. Then you will set some properties to the form and widgets to specify values like text, color or size. Finally, some code must be written to bring to life your application. Those basic steps that you'll use to create your first application, will show you the principles that you will use for develop any other application in Gambas.
basic steps to create a Gambas application?
Create the interface.
Set properties.
Write code.
1.- Fire up your Gambas IDE, then on the Welcome screen select New project. This opens the New project Wizard.
2.- On screen 1 select QT graphical application.
3.- Select a location to save your project.
4.- Type a name for your project.
Now you can build a sample application
1,2.Creating the Interface and setting the properties
Design GUI using the toolbox and set the properties
“Tell me your name:”
“Write your name here”
“My first Gambas project”
3.Writing the code
The Code editor is where you write the code for your application. The code is a set of language statements, constants & declarations.
To open the Code editor
Double click over the object you want to write code or on the Resources visor select the name of the form or module and from the contextual menu select Edit class.
To create an event procedure
Select the object.
Double click over the object to write the code for the default event. 
Write the code between the statements PUBLIC SUB & END SUB. For this lesson write the following code:
Label1.Text = "Hello " & Textbox1.Text & ". This is my first Gambas project!".
The code for the procedure must be look like this:
PUBLIC SUB Button1_Click()
Label1.Text = "Hello " & Textbox1.Text & ". This is my first Gambas project!"
4.Run the application
Click run button or from debug menu choose run or press F5.
Create a new application with three text boxes.First two will read input data and the third textbox will show the result of arithmetic operations when corresponding button is clicked.Place command buttons for each arithmetic operations.


Popular posts from this blog

KTU-FOSS LAB Solutions

Write shell scripts to show the following  ( you can write menu driven programs)
 Currently logged user and his logname ( logname)  Your current shell ( echo $SHELL)  Your home directory ( echo $HOME)  Your operating system type (echo $OSTYPE)  Your current path setting ( echo $PATH)  Your current working directory ( echo $PWD )  Show Currently logged  users ( w or who -H)      Show only the user name of logged users in the host ( users)      Details of last login ( last cek....where cek is the user id )  About your OS and version, release number, kernel version ( uname -a or  cat  /proc/version)  Show all available shells ( cat /etc/shells )  Show mouse settings (cat  /sys/class/input/mouse*/device/name )  Show computer CPU information       CPU details      ( cat /proc/cpuinfo | more )       Show information on  CPU architecture ( lscpu)       Number of Processor core ( nproc)  Show memory information       Memory details ( cat /proc/meminfo | more )       Display file system disk usage ( d…

Important Directories and Files

Important Directories
/bin                            holds the “essential” Linux commands and utilities /boot                          holds files required for boot process (kernel, vmlinuz, grub) /dev                            holds device files (hard drive, USB, CD-ROM, etc.) /etc                             holds system configuration files /etc/init.d                    holds scripts to start/stop network services /etc/rc.d                     holds system startup/shutdown scripts /etc/X11                      holds configuration files for X-windows /home                        holds user home directories (except for the root account) /lib                               holds system/shared library files /lost+found                holds files restored after system crash /mnt                            used as temporary mount point for CD-ROM, floppy, etc. /opt                              typically where large software applications are installed /proc                           holds kerne…

ER Diagrams to Table

REDUCING E-R DIAGRAM TO TABLE - A database which conforms to an E R diagram can be represented by collection of tables .For each entity set and for each relationship set in the database, we will create unique tables, which is assigned the name of the corresponding entity set or relationship sets . Each table has a no. of columns which have unique names. Each row in the table corresponds to an entity or a relationship.

REPRESENTATION OF STRONG ENTITY SET -Let E be a strong entity set with descriptive attributes a1, a2....aN . We represent this entity by table called E with N distinct columns, each of which corresponds to one of the attributes of E.

REPRESENTATION OF RELATIONSHIP SET - Let R be a relation ship set involving entity set E1,E2....En Let attribute(R) consists of 'm' attributes We can represent this relation ship set by a table called R with m distinct columns, each of which corresponds to one of the attributes in attribute (R) plus the primary key of E1..En.