From: JB (jellyboy@gmail.com)
Date: Tue Apr 18 2006 - 13:30:23 GMT-3
Hi, the above scripts work for me (depending on the platform used).
However I want the comment in the "body" of the script, not actually
in the output.
Thx,
JB
On 4/18/06, Shwe Bamar (shwebamar) <shwebamar@comcast.net> wrote:
> I don't think your foreach is correct either, should be foreach varname list
> body.
>
> For example:
>
> foreach addr addrList {
>
> # Ping the address
> try_eval {
> set out [exec ping $addr]
> puts "Ping sent ok: $out"
> } {
> puts "Ping failed..."
> }
>
> }
>
> -----Original Message-----
> From: nobody@groupstudy.com [mailto:nobody@groupstudy.com] On Behalf Of JB
> Sent: Tuesday, April 18, 2006 8:43 AM
> To: ccielab@groupstudy.com
> Subject: Adding tcl script comments
>
> Hi, when I compose a tcl script I want to include comments into it so
> I document the script:
>
> tclsh
>
> foreach addr {
>
>
> !!want to place comment here!!
>
>
> 1.1.1.1
>
> } {ping $addr}
>
>
> ++++++++++++++
>
> tclsh
>
> foreach ip {
>
> !!want to place comment here!!
>
> 1.1.1.1
>
> } {puts [exec ping $ip]}
>
>
> Does anyone from the group know how to add comments? I have tried ! and #.
>
> Cheers,
>
> JB
>
> _______________________________________________________________________
> Subscription information may be found at:
> http://www.groupstudy.com/list/CCIELab.html
This archive was generated by hypermail 2.1.4 : Mon May 01 2006 - 11:41:57 GMT-3