For Programmers: Free Programming Magazines  


Home > Archive > Tcl > June 2007 > TCL_evalFile









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author TCL_evalFile
Puneet Maheshwari

2007-06-29, 10:08 pm

Can anyone explain in detail what is the use of the functions like
TCL_evalFile. I understand that this evaluates the content of the file
as tcl script. But I do not exactly understand what kind of file is
converted to what and where does it return the changed file etc.

It will be great if anyone could suggest an online tutorial/book for
the same.

Thanks,

Puneet

Bezoar

2007-06-29, 10:08 pm

On Jun 29, 2:29 pm, Puneet Maheshwari <puneetro...@gmail.com> wrote:
> Can anyone explain in detail what is the use of the functions like
> TCL_evalFile. I understand that this evaluates the content of the file
> as tcl script. But I do not exactly understand what kind of file is
> converted to what and where does it return the changed file etc.
>
> It will be great if anyone could suggest an online tutorial/book for
> the same.
>
> Thanks,
>
> Puneet



Basically you provide it a name of a file to evaluate a good example
is : http://wiki.tcl.tk/17047
where the Swig is used to produce a dynamic module to allow the script
to modify a C structure using EvalFile

Carl

Bruce Hartweg

2007-06-30, 4:18 am

Puneet Maheshwari wrote:
> Can anyone explain in detail what is the use of the functions like
> TCL_evalFile. I understand that this evaluates the content of the file
> as tcl script. But I do not exactly understand what kind of file is
> converted to what and where does it return the changed file etc.
>


There is no "converting" or changing of the file, it just evaluates it.
the file in question should be a valid Tcl script.

Bruce

Puneet Maheshwari

2007-06-30, 4:18 am

On Jun 29, 2:24 pm, Bruce Hartweg <doNOT...@nowhere.com> wrote:
> Puneet Maheshwari wrote:
>
> There is no "converting" or changing of the file, it just evaluates it.
> the file in question should be a valid Tcl script.
>
> Bruce


But how exactly does it evaluate? Do you know any nice tutorial for
that?

Bruce Hartweg

2007-06-30, 4:18 am

Puneet Maheshwari wrote:
> On Jun 29, 2:24 pm, Bruce Hartweg <doNOT...@nowhere.com> wrote:
>
> But how exactly does it evaluate? Do you know any nice tutorial for
> that?
>


I'm not sure I understand - it evaluates it by the basic rules of the Tcl language.

the script equivalent would be

source filename

it runs the file throught he Tcl interpreter and that evaluates the commands in the script.

Bruce
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com