Well, I don't know anything about Script Basic, but if you can give it access to functions written in FB like other scripting languages that I've tried (Lua, etc...) then it would serve the same purpose - easy configuration and prototyping without having to re-compile the main program with every little change made to the scripts
Merick wrote:Well, I don't know anything about Script Basic, but if you can give it access to functions written in FB like other scripting languages that I've tried (Lua, etc...) then it would serve the same purpose - easy configuration and prototyping without having to re-compile the main program with every little change made to the scripts
???
Fb calling scriptbasic to call fb functions???
From the little I know about Lua and it's superb string handling I can
understand using it but a basic using a basic has me baffled. And it's not scriptbasic, I just don't understand why you would want to embed any interpreted basic into FreeBASIC?
Why would you want to add an interface to a SQL database when the language supports reading and writing to flat files?
ScriptBasic is a plug-in just like any other library offered here. It's LGPL with no strings attached. You may not have a need at the moment but I'm sure some of the other creative programmers here might have a few ideas.
There are numerous reasons why you would want to add scripting to a program. Remember QuakeC, or UnrealScript? The idea is to add extended functionality to a program that does not require a recompile for each change. It also allows users to extend a program without having to wait for the programmer to (who knows when?) add in the functionality.
Suppose you have a roguelike game that uses scripts for the character stats, items and monsters. A player could tweak the scripts so that instead of a fantasy rl, they could play a sci-fi rl, or whatever they wanted, and it wouldn't require wading through someone else's source code or waiting for a new version that may or may not appear.
I could cite example after example, but the point is, this is something good to have, and to have it already packaged up and ready to use is a real plus. I for one, will find this quite handy.
I am really out of my league here as I have no idea how game scripting works so please bear with me.
The very spartan example shows me very little on how one would interface in the scenario rdc mentions. Maybe someone could put together a small example?
The embedding of ScriptBasic will become more apparent when an example of loading a ScriptBasic program of functions and subs and their called from the host application. You have full access to global and local variables of the script from the host application.
The libscriba.dll/so/dylib is less then 500KB and works with Windows, Linux and OS X using a common SB script.
I don't know of any other object like scripting solutions that is cross platform and doesn't need a DVD to install it.
ScriptBasic is a typeless traditional Basic syntax that's easy to use.
I use the MySQL DB extension module in ScriptBasic rather then PostgreSQL option. It doesn't mean PostgreSQL sucks. I'm not trying to sell (because it's open source and free) anyone on ScriptBasic. If you know of a better solution, please educate me so I don't continue to waste your time and mine.