How to get variable value from user?

Jan 8, 2008 at 6:20 AM
Hi,

I just found your library. I read many topics in this web site but there is no topics detail that match.

I have one class to parse equation that user can create. In this equation will have any variable that user use. When this class parse until detected variable, program will ask use to input the value to that variable or I will write program to find the value fo variable in the form that I know that there is. This class will raise GetVariableValue event. That is I can write any code in this event. So, I would like to know that if I use FLEE, how can I get value of variable? Do you have GetVariableValue in FLEE?

Because you write this library better than me, so, I would like to use yours instead of mine.

Thanks in advance.
Coordinator
Jan 10, 2008 at 2:47 AM
I think what you're basically asking for is on-demand variables. Unfortunately, due to the way FLEE works, it needs to know the type of each variable while the expression is being compiled. So there would need to be two events: GetVariableValue and GetVariableType. But if the variables are coming from the user, I don't see how you would know their type.
Jan 10, 2008 at 6:06 AM
Thank you very much for your answer.

It is useful for me to know that there are at least 2 events to get variable value. There is no problem for variable type because I can specify the type e.g. Double only. Then, I will check it before sending to FLEE. Is this possible? I have to declare variable in my program also. This means I can specify the exact variable type, right?

I will try to use FLEE and if I have any problem, I will contact you again.

Thank you very much for your time to do a good tool.
Coordinator
Jan 10, 2008 at 11:09 PM
Oh sorry, I guess I wasn't clear in my reply: There is no GetVariableEvent right now, I will put one in in the next release (this weekend).

> I have to declare variable in my program also. This means I can specify the exact variable type, right?
Yes, you specify the type of the variable when you define it.
Coordinator
Jan 13, 2008 at 12:11 AM
On-demand variables are implemented in Flee-0.9.15.0. You can find the documentation here.
Jan 14, 2008 at 1:28 AM
Thank you very much for your prompt update. I will learn and try. If there is any question, I will discuss with you in this forum.