Vi riporto questa discussione:
" Is it possible for a compiled program to read instructions from a text file?
I'm trying to write a program that can have functions added without needing
to recompile the base program.
VonZorch "
" Of course you can *read* them (File.Load()). You can also execute certain
types of Gambas source code (a subset of Gambas one-liners) from a string
variable at runtime (Eval()) and you can write, rewrite and execute whole
projects and scripts (Shell "gbx3 ...", Shell "gbs3 ...").
The only difficult thing is if you want to make plugins with this, where by
"plugin" I mean external Gambas classes which interact with your classes in
a single Gambas process. You can achieve a limited form of this without own
effort using Eval() and a Collection where you store the plugin environment.
But as briefly mentioned above, you can only have certain types of one-line
code with Eval(). Suitable if you want to be able to add very simple math
functions, macro abilities or the like to your program (but beware of giving
random text files access to Eval() as it is a gate to each and every public
symbol in your process).
The definitive answer to your question depends on what you didn't tell us
about your goal.
Regards,
Tobi "
" I don't think so. In old Clipper 5 I had a database with "codeblocks" that
you can load in execution time... but this is a big hole in security, I
guess...
Regards
Jorge "