davidbelarus
Programmer
I got an interesting result here.
the nested if worked fine when i put numbers in. when i put a letter in, i expected it to go to the else(non-standard case i presumed) for some reason it went to the ifelse statement.
#!/usr/bin/expect -f
set version "x"
send "Version is $version\n"
expect "cfe> "
if {$version <1300} {
puts "version is less than 1300"
} elseif {$version >= 1300} {
puts "version is more than 1300"
} else {
puts "version exactly 1300"
}
the nested if worked fine when i put numbers in. when i put a letter in, i expected it to go to the else(non-standard case i presumed) for some reason it went to the ifelse statement.
#!/usr/bin/expect -f
set version "x"
send "Version is $version\n"
expect "cfe> "
if {$version <1300} {
puts "version is less than 1300"
} elseif {$version >= 1300} {
puts "version is more than 1300"
} else {
puts "version exactly 1300"
}