Re: Syntax
- From: Alexandre Ferrieux <alexandre.ferrieux@xxxxxxxxx>
- Date: Fri, 28 Sep 2007 17:21:16 -0000
On Sep 28, 7:03 pm, mohitanch...@xxxxxxxxx wrote:
I can't find good tutorial about syntax of / %.
In expect script I am trying to do something like this:
set size [file size $tp_receive_to_path]
# Now check if it return 0
if { $size mod 72 != 0 } {
# receive file! Retry
send -s -- "get $tp_receive_to_tmppath
$tp_receive_to_path\r"
}
Is syntax of if and mod correct ?
Say... Don't you see a nice and self-explanatory error message like
invalid bareword "mod"
in expression " $size mod 72 != 0 ";
should be "$mod" or "{mod}" or "mod(...)" or ...
Then, go to [expr] manpage and look for operator "%".
I'd also put in more explicit grouping: {($size % 72)!=0}
-Alex
.
- References:
- Syntax
- From: mohitanchlia
- Syntax
- Prev by Date: Re: ANNOUNCE: eTcl 1.0-rc23 (based on 8.4.16)
- Next by Date: Re: Syntax
- Previous by thread: Syntax
- Next by thread: Re: Syntax
- Index(es):