Re: [Gambas-user] SimpleEval - Error

2016-11-28 Thread Fabien Bodard
Here it is :-) This is a simple demo of how to do a specific interpreter. You can add variable with value numbers or text. You can set a formula with just numbers function and iif function In the formula in the demo you can see the sum function that is a custom function (that just add the two p

Re: [Gambas-user] SimpleEval - Error

2016-11-28 Thread Charlie
Hi Fabien, is there any progress on this please. Thanks, Charlie -- View this message in context: http://gambas.8142.n7.nabble.com/SimpleEval-Error-tp57833p57900.html Sent from the gambas-user mailing list archive at Nabble.com. --

Re: [Gambas-user] SimpleEval - Error

2016-11-23 Thread Fabien Bodard
I will do a little example for you 2016-11-22 14:51 GMT+01:00 Charlie : > I am sorry but I do not understand your explanation. I obviously don't have > the in depth knowledge of Gambas that you do. Can you please be a little > more explicit. Thanks. > > > > -- > View this message in context: > ht

Re: [Gambas-user] SimpleEval - Error

2016-11-22 Thread Charlie
I am sorry but I do not understand your explanation. I obviously don't have the in depth knowledge of Gambas that you do. Can you please be a little more explicit. Thanks. -- View this message in context: http://gambas.8142.n7.nabble.com/SimpleEval-Error-tp57833p57846.html Sent from the gambas-

Re: [Gambas-user] SimpleEval - Error

2016-11-19 Thread Fabien Bodard
You must to know that gambas have it's own external interpreter now that use the internal stuff of gambas. An example of use can be see in the reportlabel.class of gb.report. Le 19 nov. 2016 13:29, "Charlie" a écrit : > I am interested in SimpleEval 0.2.0 which is on the 'Farm' but I get this > e

[Gambas-user] SimpleEval - Error

2016-11-19 Thread Charlie
I am interested in SimpleEval 0.2.0 which is on the 'Farm' but I get this error: - http://gambas.8142.n7.nabble.com/file/n57833/Eval1.png"; border="0"/> If I try to run the program another error appears: -

Re: [Gambas-user] SimpleEval

2015-12-31 Thread Fabien Bodard
Le 31 déc. 2015 15:36, "Charlie" a écrit : > > This is working out well! Your code can handle some complex maths. > Is there any way to handle negative numbers? If an answer is negative it > works but if you input "*-5*6*" it does not work. > I have also attached my code, still in development, so

Re: [Gambas-user] SimpleEval

2015-12-31 Thread Charlie
This is working out well! Your code can handle some complex maths. Is there any way to handle negative numbers? If an answer is negative it works but if you input "*-5*6*" it does not work. I have also attached my code, still in development, so you can see what I am doing with your code.

Re: [Gambas-user] SimpleEval

2015-12-31 Thread Charlie
Thanks, that's excellent. I will work on that. -- View this message in context: http://gambas.8142.n7.nabble.com/SimpleEval-tp55114p55138.html Sent from the gambas-user mailing list archive at Nabble.com. -- ___

Re: [Gambas-user] SimpleEval

2015-12-30 Thread Fabien Bodard
2015-12-30 17:37 GMT+01:00 Charlie : > Can I get your code to calculate something like > 28*(5/2.3) > If so how? Dim hEval As New SimpleEval hEval.Formula = "28*(5/2.3)" hEval.Execute If Not hEval.Error Then Print hEval.Value Else Print hEval.ErrorText Endif -

Re: [Gambas-user] SimpleEval

2015-12-30 Thread Charlie
Can I get your code to calculate something like 28*(5/2.3) If so how? -- View this message in context: http://gambas.8142.n7.nabble.com/SimpleEval-tp55114p55134.html Sent from the gambas-user mailing list archive at Nabble.com. ---

Re: [Gambas-user] SimpleEval

2015-12-29 Thread Fabien Bodard
In fact internally it use two process. the first one when you set the formula. It compile it... understand reorganize and traduce the formula into interpreter readable sequences. The second one when you call Execute, the interpreter read the stored sequence. During this process if some variables a

Re: [Gambas-user] SimpleEval

2015-12-29 Thread Fabien Bodard
you can get the error and the error pos too, i've updated the class on the farm to remove the compilation warnings 2015-12-30 7:21 GMT+01:00 Fabien Bodard : > From the Main Module in the Farm example : > > > Public Sub Main() > Dim hEval As New SimpleEval As "Eval" > Dim hEx As New EvalEx As

Re: [Gambas-user] SimpleEval

2015-12-29 Thread Fabien Bodard
>From the Main Module in the Farm example : Public Sub Main() Dim hEval As New SimpleEval As "Eval" Dim hEx As New EvalEx As "Eval" 'Test with an unknown variable hEval.Formula = "IF(Test=1;'TROUVE';'PERDU')" hEval.Execute If Not hEval.Error Then Print hEval.Value Else Prin

Re: [Gambas-user] SimpleEval

2015-12-29 Thread Fabien Bodard
You get the class from where ? 2015-12-29 15:18 GMT+01:00 Charlie : > Hi Fabian, > I presume that you wrote the code in SimpleEval. I can't work out how to use > it. I thought it might work with my gbCalculator (see Gmabas Farm). There > are quite a few compile warning errors. >

[Gambas-user] SimpleEval

2015-12-29 Thread Charlie
Hi Fabian, I presume that you wrote the code in SimpleEval. I can't work out how to use it. I thought it might work with my gbCalculator (see Gmabas Farm). There are quite a few compile warning errors. *The main thing is some example