Xojo Developer Conference
25/27th April 2018 in Denver.
MBS Xojo Conference
6/7th September 2018 in Munich, Germany.

[MBS] Expression Evaluator (MBS Xojo Plugin Mailinglist archive)

Back to the thread list
Previous thread: [MBS] Rendezvous?
Next thread: [MBS] Starting the week


[MBS] Midi?   -   Christian Schmitz
  [MBS] Expression Evaluator   -   Juergen Schreck
   Re: [MBS] Expression Evaluator   -   Christian Schmitz
    Re: [MBS] Expression Evaluator   -   Juergen Schreck
    Re: [MBS] Expression Evaluator   -   Beatrix Willius

[MBS] Expression Evaluator
Date: 13.01.03 16:05 (Mon, 13 Jan 2003 09:05:59 -0600)
From: Juergen Schreck
Hi all,

I'm wondering if there's a really good (fast?) implementation of an
expression evaluator in RB. Not only for Math, but also String operations.
I'm getting to a point where I'd like to implement something similar to
Filemakers 'Calculation Fields' in my Database applications for RB.

It's possible to do this in RBScript of course, but whichever way I try it's
rather awkward. RBScript is great for complex scripts and all, but for a
more expression-like syntax it's way to complicated. Required data-typeing,
but in/out only via strings, etc. pp.

Context helps but it's still ugly. To me an expression evaluator should not
require to define types and return it's result in a variant and then I can
cast it to whatever I need after it is finish. Kinda like a real interpreted
scripting lang like PERL, TCL or PHP.

Any such animal exist? If not - is this a reasonable request for a plugin?
Is there some x-plat lightweight solution that could be wrapped into an RB
plugin without re-inventing the wheel?

Regards,
Juergen

Re: [MBS] Expression Evaluator
Date: 13.01.03 19:51 (Mon, 13 Jan 2003 19:51:35 +0100)
From: Christian Schmitz
> Hi all,
>
> Context helps but it's still ugly. To me an expression evaluator should not
> require to define types and return it's result in a variant ...

There are no variants in a plugin. Simply the API doesn't exist for
variants.

I suggest a precompiler which takes an expression and adds some lines
around to make it working in RBScript.

Mfg
Christian

Re: [MBS] Expression Evaluator
Date: 13.01.03 23:07 (Mon, 13 Jan 2003 16:07:39 -0600)
From: Juergen Schreck
Good suggestion. I'd already arrived at that point with RB script and pretty
much hate it. Anyone know of such a precomp beast in existence? Any good
advice on writing one?

Thanks,
Juergen

On 1/13/03 12:51 PM, "Christian Schmitz" <<email address removed>>
wrote:

>> Hi all,
>>
>> Context helps but it's still ugly. To me an expression evaluator should not
>> require to define types and return it's result in a variant ...
>
> There are no variants in a plugin. Simply the API doesn't exist for
> variants.
>
> I suggest a precompiler which takes an expression and adds some lines
> around to make it working in RBScript.
>
> Mfg
> Christian

Re: [MBS] Expression Evaluator
Date: 14.01.03 09:43 (Tue, 14 Jan 2003 09:43:24 +0100)
From: Beatrix Willius
Hello,

did you have a look at the Lua Plugin? It is supposed to be simpler than RB
Script. For an url search the NUG archives (http://www.amianduri.com or
something like that).

Regards

Trixi Willius