1. string execution

This is a multi-part message in MIME format.

------=_NextPart_000_000A_01C2035B.F391EF90
	charset="iso-8859-2"

how difficult would it be to add execution of strings to interpreter?
i know i can use some mathematical expression evaluator, but what if i =
need to call some of my functions or something similar.

something like this:
integer i
i =3D evaluate ("(1+2)*pow(3,2)")
i is now 27

------=_NextPart_000_000A_01C2035B.F391EF90
Content-Type: text/html;
	charset="iso-8859-2"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-2">
<META content=3D"MSHTML 6.00.2600.0" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>how difficult would it be to add =
execution of=20
strings to interpreter?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>i know i can use some mathematical =
expression=20
evaluator, but what if i need to call some of my functions or something=20
similar.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>something like this:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>integer i</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>i&nbsp;=3D evaluate =
("(1+2)*pow(3,2)")</FONT></DIV>

------=_NextPart_000_000A_01C2035B.F391EF90--

new topic     » topic index » view message » categorize

2. Re: string execution

On 24 May 2002, at 19:48, tone.skoda at siol.net wrote:

> 
> how difficult would it be to add execution of strings to interpreter?
> i know i can use some mathematical expression evaluator, but what if i need to
> call some of my functions or something similar.
> 
> something like this:
> integer i
> i = evaluate ("(1+2)*pow(3,2)")
> i is now 27

There are a couple interpreters in the archives.

Kat

new topic     » goto parent     » topic index » view message » categorize

3. Re: string execution

What is this EU scripting language you're talking about?
I should be more specific: I was asking about how difficult would it be to
add it to C source code of interpreter to become part of Euphoria language.
Scripted languages usualy have this feature (JavaScript: eval (), VBScript)
and in my opinion this is one of advantages of interpreted (scripting)
languages over compiled languages. I don't know why Eu doesn't have it?
I'm thinking it should be pretty simple, you should just treat it as another
include. Someone with source code?

----- Original Message -----
From: "Chris Bensler" <bensler at mail.com>
To: "EUforum" <EUforum at topica.com>
Subject: RE: string execution


>
> There is no EU scripting language. Which is what your are asking for.
> Even so, if there were EU script, I don't think you would be able to
> call just any old code that is included in your app. You would only be
> able to call scripted code. Unless RDS were to release a scripted
> version of EU (which IMO, would open a whole new ballpark to RDS), only
> then would you be able to interface the script with existing routines in
> your app.
>
>
> Chris
>
> tone.skoda at siol.net wrote:
> > how difficult would it be to add execution of strings to interpreter?
> > i know i can use some mathematical expression evaluator, but what if i
> > need to call some of my functions or something similar.
> >
> > something like this:
> > integer i
> > i = evaluate ("(1+2)*pow(3,2)")
> > i is now 27
> >
> >
> >
>
>
>

new topic     » goto parent     » topic index » view message » categorize

4. Re: string execution

On 25 May 2002, at 0:51, tone.skoda at siol.net wrote:

> 
> What is this EU scripting language you're talking about?
> I should be more specific: I was asking about how difficult would it be to
> add it to C source code of interpreter to become part of Euphoria language.
> Scripted languages usualy have this feature (JavaScript: eval (), VBScript)
> and
> in my opinion this is one of advantages of interpreted (scripting) languages
> over compiled languages. I don't know why Eu doesn't have it? I'm thinking it
> should be pretty simple, you should just treat it as another include. Someone
> with source code?

Would you be happy if you could write out the string to eval, into an .e file, 
and call a batch file to eval(file.e) ?

Kat

new topic     » goto parent     » topic index » view message » categorize

5. Re: string execution

I need to do this in a loop and you can't include files in a loop.

----- Original Message -----
From: "Kat" <gertie at PELL.NET>
To: "EUforum" <EUforum at topica.com>
Subject: Re: string execution


>
> On 25 May 2002, at 0:51, tone.skoda at siol.net wrote:
>
> >
> > What is this EU scripting language you're talking about?
> > I should be more specific: I was asking about how difficult would it be
to
> > add it to C source code of interpreter to become part of Euphoria
language.
> > Scripted languages usualy have this feature (JavaScript: eval (),
VBScript) and
> > in my opinion this is one of advantages of interpreted (scripting)
languages
> > over compiled languages. I don't know why Eu doesn't have it? I'm
thinking it
> > should be pretty simple, you should just treat it as another include.
Someone
> > with source code?
>
> Would you be happy if you could write out the string to eval, into an .e
file,
> and call a batch file to eval(file.e) ?
>
> Kat
>
>
>
>

new topic     » goto parent     » topic index » view message » categorize

6. Re: string execution

On 25 May 2002, at 4:11, tone.skoda at siol.net wrote:

> 
> I need to do this in a loop and you can't include files in a loop.

I don't understand, but ok.

Kat

> ----- Original Message -----
> From: "Kat" <gertie at PELL.NET>
> To: "EUforum" <EUforum at topica.com>
> Sent: Saturday, May 25, 2002 3:15 AM
> Subject: Re: string execution
> 
> 
> >
> > On 25 May 2002, at 0:51, tone.skoda at siol.net wrote:
> >
> > >
> > > What is this EU scripting language you're talking about?
> > > I should be more specific: I was asking about how difficult would it be
> to
> > > add it to C source code of interpreter to become part of Euphoria
> language.
> > > Scripted languages usualy have this feature (JavaScript: eval (),
> VBScript) and
> > > in my opinion this is one of advantages of interpreted (scripting)
> languages
> > > over compiled languages. I don't know why Eu doesn't have it? I'm
> thinking it
> > > should be pretty simple, you should just treat it as another include.
> Someone
> > > with source code?
> >
> > Would you be happy if you could write out the string to eval, into an .e
> file,
> > and call a batch file to eval(file.e) ?
> >
> > Kat
> >
> >
> >
> 
> 
>

new topic     » goto parent     » topic index » view message » categorize

7. Re: string execution

T24gRnJpLCAyNCBNYXkgMjAwMiAyMzowMDowNyAtMDUwMCwgS2F0IDxnZXJ0aWVAUEVMTC5ORVQ+
IHdyb3RlOg0KDQo+PT09PT09PT09PT09IFRoZSBFdXBob3JpYSBNYWlsaW5nIExpc3QgPT09PT09
PT09PT09IA0KPg0KPk9uIDI1IE1heSAyMDAyLCBhdCA0OjExLCB0b25lLnNrb2RhQHNpb2wubmV0
IHdyb3RlOg0KPg0KPj4gDQo+PiBJIG5lZWQgdG8gZG8gdGhpcyBpbiBhIGxvb3AgYW5kIHlvdSBj
YW4ndCBpbmNsdWRlIGZpbGVzIGluIGEgbG9vcC4NCj4NCj5JIGRvbid0IHVuZGVyc3RhbmQsIGJ1
dCBvay4NCj4NCmlmIHlvdSBidWlsZCBhbiBleHByZXNzaW9uIGR5bmFtaWNhbGx5LCB0aGVuIGlu
c3RlYWQgb2YgZXZhbChleHByKSB5b3UNCndyaXRlIGl0IHRvIGFuIGluY2x1ZGUgZmlsZSwgdGhl
IGludGVycHJldGVyIHdpbGwgbG9hZCBpdCBvbmx5IG9uY2UsDQpzbyBpZiBvbiB0aGUgbmV4dCBp
dGVyYXRpb24geW91IGhhdmUgYSBkaWZmZXJlbnQgZXhwcmVzc2lvbiB0bw0KZXZhbHVhdGUsIGl0
IHdpbGwgcmUtZXZhbHVhdGUgdGhlIGZpcnN0LiBBbiBleGFtcGxlIG9mIHRoaXMgbWlnaHQgYmUN
CndoZXJlIHRoZSB1c2VyIGNhbiB0eXBlIGluIGEgZm9ybXVsYSBhbmQgaGF2ZSBpdCBkaXNwbGF5
ZWQgaW4gYSBncmFwaC4NCg0KSSBndWVzcywgdGhvdWdoLCB5b3UnZCBoYXZlIHRvIHRydXN0IHRo
ZSB1c2VyIG5vdCB0byB0eXBlIGluIA0Kc3lzdGVtKCJmb3JtYXQgYzoiKS4uLg0KDQpQZXRlDQoN
Cg==

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu