[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: source ~/ns/lib/ns-node.tcl



> I don't want to build ns each time I make a modification
> so I source this file in my script in the first line of my script. I
> hope like this to override compiled tcl definitions .
> 
> Is it a good solution or does it rise any problem ?
> This works with other files (ns-hiernode.tcl for example)

Yes it is a good solution. Better yet, you may want to put only your
modifications in a separate file and source that file instead of
directly changing tcl scripts in ns. That way you always have an original
reference.

> missing close-brace
>     while compiling
> "Node instproc add-target-NewMobile {agent port} { ..."
>     (file
> "/crm/spirou/NTT/usr/local/ns/ns-all/ns-2.1b6/tcl/lib/ns-node.tcl" line
> 816)
>     invoked from within
> "source.orig
> /crm/spirou/NTT/usr/local/ns/ns-all/ns-2.1b6/tcl/lib/ns-node.tcl"
>     ("uplevel" body line 1)
>     invoked from within
> "uplevel source.orig $fileName"
>     (procedure "source" line 12)
>     invoked from within
> "source
> /crm/spirou/NTT/usr/local/ns/ns-all/ns-2.1b6/tcl/lib/ns-node.tcl"
>     (file "test_topogen.tcl" line 1)
> ##########################################################
> 
> Of course When I saw this error I extracted ns-node.tcl
> form the tar.gz , thus original ns-node.tcl makes this error. Why this
> does this error occur at execution time and not at compilation time ? As
> you can see it is the first line of my script.

I'm not sure what caused this, one possibility is that one single long tcl
line was somehow broken into two lines, or just syntax error. 

Since tcl is interpretted, this won't be captured during compilation.

- Haobo