1gbs3(1) User Commands gbs3(1)
2
3
4
6 gbs3 - GAMBAS Scripter.
7
8
10 gbs3 [options] [--] [<script file> | <project directory> | -]
11 gbs3 --convert-project <source project directory> <destination script
12 directory>
13 gbs3 --convert-script <script file> [<Destination where project direc‐
14 tory is created>]
15 gbs3 [-p | --plugin] <script file> [<Destination directory where plugin
16 is created>]
17
18
20 Gambas is a free development environment based on a Basic interpreter
21 with object extensions,
22 a mix of Java(tm) and Visual Basic(tm).
23 With Gambas, you can quickly design your program GUI, access MySQL or
24 PostgreSQL databases,
25 pilot KDE applications with DCOP, translate your program into many lan‐
26 guages, and so on...
27
28 gbs3 is the interpreter that allows you to compile and execute a Gambas
29 script.
30 gbs3 may also be used to convert a Gambas project to a script or a
31 script back to a project.
32
33
35 -b, --buildonly
36 process and compile the script without executing it
37
38 -c, --nocache
39 force the script compilation (do not check cache)
40
41 --convert-project
42 convert a Gambas project into an executable Gambas script file
43
44 --convert-script
45 convert a Gambas script file into a Gambas project
46
47 -e execute the source code provided by the command line ( ':' sepa‐
48 rator )
49
50 -f, --fast
51 use just-in-time compiler
52
53 -g, --debug
54 add debugging information to application
55
56 -h, --help
57 display help and exit
58
59 -l, --list
60 display a list of available Components or Libraries, '-l compo‐
61 nent' or '-l library'
62
63 -L, --license
64 display license
65
66 -p, --plugin
67 generate a plugin executable that can be loaded by other scripts
68
69 -S --strict
70 fail if 'Public' or 'Sub' are defined without a 'main' function
71 otherwise create main()
72
73 -t, --trace
74 turn on tracing option during execution
75
76 -T, --terse
77 only print a very terse error report on compile errors
78
79 -u, --use
80 load component or libraries ('comp1,comp2,lib1...')
81
82 -v, --verbose
83 be verbose
84
85 -V, --version
86 display version
87
88 -w, --warnings
89 display warnings during compilation
90
91
93 gbs3 can convert a Gambas project into an executable script file using
94 the --convert-project option. The input project directory is used to
95 create the script which is written to the output script directory. The
96 script is created and named the same as the originating project.
97 gbs3 MyProjectDirectory DestinationScriptDirectory
98
99
100
102 gbs3 can convert a script file to a full Gambas project using the
103 --convert-script option.
104 The input script is translated into a project by the same basename as
105 the script and is created in the specified directory. In the case in
106 which no output directory is specified, the environment variable PWD is
107 used as the location to create the Gambas project.
108 gbs3 MyScript.gbs ~/Projects
109 This created the project 'MyScript' directory in the users 'Projects'
110 directory.
111
112
114 gbs3 can create plugins that can be used by other scripts or Gambas ap‐
115 plications after being built using the --plugin or -p option. Plugins
116 are created in a user-selected directory and are also executed and
117 cached in this directory, unlike a normal script, in which executables
118 are created in the temp directory and are executed from there. This
119 allows plugins to persist after the scripter exits.
120 If no output destination is specified, then the plugin is created in
121 the ~/.local/lib/gambas directory. and may be loaded from there using
122 the component.load() function.
123 gbs3 MyPluginScript [Plugin Destination Directory]
124
125
127 #!/usr/bin/env gbs3
128 for i as integer = 0 to 10
129 print i;;
130 next
131
132
134 The latest version of Gambas can always be obtained from
135 gambas.sourceforge.net,
136 documentation about the language is at
137 http://gambaswiki.org/wiki.
138
139
141 Report bugs to http://gambaswiki.org/bugtracker
142
143
145 Copyright© Benoît Minisini <g4mba5@gmail.com>;
146
147 This is free software; see the source for copying conditions. There is
148 NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR
149 PURPOSE.
150
151
152
153Ubuntu March 2021 gbs3(1)