PDA

View Full Version : Evaluating LScript in LScript



Karsten Lueth
04-01-2003, 04:55 AM
Hi,

I need a LScript function that takes a string
argument and evaluates this string as LScript
expression or statements, such as

result = evalexpr("2+3");

or

evallscript( /* some LScript program as string*/...);

Does such LScript functions exists at all?
I coudn't found them in the documentation...

Karsten

faulknermano
04-01-2003, 09:05 AM
hmm. interesting... you can try regexp(), but i'm not sure if that will fit your bill. (it's in in one of the 2.x release notes, from 2.0 to 2.2.2, i think)

Karsten Lueth
04-02-2003, 01:24 AM
Thanks,
but regexp won't do it. regexp is only good for string pattern matching. But I'm looking for a function thats evaluates an LScript thats has been entered by the user from a requester.

Tom Speed
04-02-2003, 08:04 PM
Hi,

I think you'd have to write your own interpreter for that. There's some funky new expression stuff available in v2.6, i've not messed with it yet, but it may be of interest to you.


Expressions in v2.6 (http://www.lightwave-outpost.com/Bob/LScript/v26.html#EXPRESS)

Cya!
Tom