http://gambaswiki.org/bugtracker/edit?object=BUG.903&from=L21haW4-

Comment #3 by Fabien BODARD:

You can use INCLUDE for that.


#!/bin/env gbs3

Private myVar as Integer


INCLUDE "DBDef.gbs"

MyConnectionFunction




You can use the CLASS / END CLASS keywords to define a class too.


So to create a reusable class you have to define it in the imported file for 
example.

===============MyClassFile.gbs============

CLASS MyClass

Static Public Function OpenDB(dbname as string)

End


END CLASS

========================


==========myscript.gbs==========

IMPORT "MyClassFile.gbs"


MyClass.OpenDB("mydb")



========================


Be carefull with IMPORT as it just insert the file content.



------------------------------------------------------------------------------
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785351&iu=/4140
_______________________________________________
Gambas-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gambas-user

Reply via email to