<> wrote in message
> >If you want to find out how to add scritping type capabilities so that
> >users
>>can extend your system with arbitrary functions, with no recompile, check
>>out MiniBasic, on my website. Full compilable source is free. You can
>>modify
>>it to your heart's content. If you want everything neatly together in a
>>pdf
>>it costs $1.25, and you can have it printed and bound for a few dollars
>>more. (This is the wonder of Lulu).
>
> I'm not sure I understand how I would be able to impliment this. Is
> there any chance that you can elaborate as to how I can use MiniBasic
> to make it so that users could write pluggin style scripts that would
> be used by the system. Reguardless I think I will include MiniBasic.
> I have fooled around with it a bit and I like it. I will be sure to
> give you credit for it.
> Nori
>
You want some of the functionality in the program to be added by the user,
at run time, rather than the programmer, at compile time.
*****
That starts with a menu.
1)Add 2)Subtract 0)Add Mod
::
When entering zero:
Mod Source
:

whatever.c or maybe .o would be better)
Say the mod we put in was to add a divide option to the main menu.
The program would then be:
1)Add 2)Subtract 3)Divide 0)Add Mod
*****
So they way you would do this, using MiniBasic, would be to have a button
which the user can press. This give a field for the name of the function,
and a text box for the code to achieve it.
So the user would enter "divide".
The script is set up so that the two operands are input, and the result
output
10 INPUT numerator
20 INPUT denominator
30 PRINT numerator / denominator
This performs a divide.
When you call the function, you aet up two temporary streams, plus another
one for errors. You insert the two operands into the input stream, call the
function, and extract the result from the output stream. You then test it
for legality.
So the user can add absolutely any function that he is able to program in
BASIC.
Fool about with the program and see what you think.
--
www.personal.leeds.ac.uk/~bgy1mm