Re: Syntax
- From: Bryan Oakley <oakley@xxxxxxxxxxxxxxxxxxxx>
- Date: Fri, 28 Sep 2007 18:55:28 GMT
Cameron Laird wrote:
In article <1190998986.136312.167350@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>,
<mohitanchlia@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 ?
I think what you first want is
if [expr $size % 72] {...
Eventually you'll write this as
if {0 != [expr $size % 72]} {...
Cameron, you've been writing too much C lately. :-)
if {$size % 72 != 0} {...
--
Bryan Oakley
http://www.tclscripting.com
.
- References:
- Syntax
- From: mohitanchlia
- Re: Syntax
- From: Cameron Laird
- Syntax
- Prev by Date: Converting ANI to DNIS on a cisco router
- Next by Date: Re: Simple parser for C/C++
- Previous by thread: Re: Syntax
- Next by thread: reversing html
- Index(es):
Relevant Pages
|