[Gambas-user] A little thing to play with gambas
Fabien Bodard
gambas.fr at ...626...
Mon Oct 15 21:57:20 CEST 2007
Hi to all,
I've done a little Gambas program that allow to use gambas as a script
programming language.
I know that it will be better to do it in C but it is just to make a mockup...
It add Three new KEYWORDS :
- USE : is for give used components
- CLASS *: is for begin a class content and ended with END CLASS
- INCLUDE: Allow to include another script file anywhere in the code (like in
php)
To use gbs2 you need to compile it in the ide, and copy the executable
in /usr/local/bin, then make a symbolic link named 'gbs2'
The test then can be launched by the ./test.gbs command
I hope i work ... it's just an early alpha... but i think it's suffisely cool
to be showed.
Fabien Bodard
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gbs2-0.0.24.tar.gz
Type: application/x-tgz
Size: 6669 bytes
Desc: not available
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20071015/ca9db798/attachment.bin>
-------------- next part --------------
#!/usr/bin/env gbs2
USE gb.qt
INCLUDE inc.gbs
PUBLIC SUB Main()
CTest.Test
END
CLASS CTest
STATIC Public sub Test()
Dim hForm as New frmTest as "Form"
frmTest.Show
END
Public sub Form_Hide()
Message("You have closed me")
End
END CLASS
-------------- next part --------------
USE gb.qt
CLASS frmTest
INHERITS Form
Private hForm as Form
Public Sub _New()
Dim txtlbl as TextLabel
txtlbl = new TextLabel(ME)
ME.Arrangement = arrange.fill
txtLbl.Text = "<b>Incredible!!! </b>"
END
END CLASS
More information about the User
mailing list