Create Date: Jul 11 2013 2:15PM
Hi,
I want to compare the content of a variable with a string, but it doesn't works.
Here the posting of some examples and the error messages which I get:
# variables
set var count 0
set var par1 "Image"
# example 1
set var count ($count + 1)
show var count
while ("$par1" != "Image") DO
show var $par1
endwhile
# Message:
# Error:can't read "par1": no such variable
# Variable Image not found.
# Error: Mismatched ENDWHILE
# example 2
set var count ($count + 1)
show var count
while ("Image" != "Image") DO
show var $par1
endwhile
# No Error-Message
# example 3
set var count ($count + 1)
show var count
while (part1 != "Image") DO
show var $par1
endwhile
#Error-Message:
#Error:syntax error in expression "(part1 != "Image")"
#Variable Image not found.
#Error: Mismatched ENDWHILE
Does somebody knows the rigth syntax?
(from Hans_Vedder)