This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

Any difference between EVAL and EXEC

Old posts that have not been replied to for several years.
Locked
User avatar
awyeah
Revered One
Posts: 1580
Joined: Mon Apr 26, 2004 2:37 am
Location: Switzerland
Contact:

Any difference between EVAL and EXEC

Post by awyeah »

I would like to know if there is any difference between EVAL and EXEC, to me they give the same results. Does anything differ in any other case(s)?

Code: Select all

<awyeah> .tcl eval pwd
<adapter> Tcl: /usr/home/elite/eggdrop
<awyeah> .tcl exec pwd
<adapter> Tcl: /usr/home/elite/eggdrop
<awyeah> hmm same results
·­awyeah·

==================================
Facebook: jawad@idsia.ch (Jay Dee)
PS: Guys, I don't accept script helps or requests personally anymore.
==================================
g
greenbear
Owner
Posts: 733
Joined: Mon Sep 24, 2001 8:00 pm
Location: Norway

Post by greenbear »

well, for starters, 'eval pwd' executes the tcl command 'pwd', while 'exec pwd' executes the shell command 'pwd'.
G
Galadhrim
Op
Posts: 123
Joined: Fri Apr 11, 2003 8:38 am
Location: Netherlands, Enschede

Post by Galadhrim »

even I got that :p
User avatar
De Kus
Revered One
Posts: 1361
Joined: Sun Dec 15, 2002 11:41 am
Location: Germany

Post by De Kus »

with your long expierience that question sounds like a joke ^-^.

try using:
exec die
and then:
eval die
and you know the diffrence :D.
De Kus
StarZ|De_Kus, De_Kus or DeKus on IRC
Copyright © 2005-2009 by De Kus - published under The MIT License
Love hurts, love strengthens...
User avatar
awyeah
Revered One
Posts: 1580
Joined: Mon Apr 26, 2004 2:37 am
Location: Switzerland
Contact:

Post by awyeah »

No I don't use eval or exec, on my scripts because they are not related to mostly tasks I script. Just wanted to get an idea from people.
·­awyeah·

==================================
Facebook: jawad@idsia.ch (Jay Dee)
PS: Guys, I don't accept script helps or requests personally anymore.
==================================
G
Guvnor
Voice
Posts: 3
Joined: Thu Jun 09, 2005 6:01 pm

Post by Guvnor »

awyeah wrote:
No I don't use eval or exec, on my scripts because they are not related to mostly tasks I script. Just wanted to get an idea from people.
Oh yeah your codes are full of else if 's heh, just kiddin
Locked