bayonne-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bayonne-devel] "if" statement occasionaly does not work.


From: Anton Dedov
Subject: [Bayonne-devel] "if" statement occasionaly does not work.
Date: Mon, 1 Nov 2004 15:04:25 +0700

Hello,

I am trying to retrive some value from SQL and branch script execution
depending on it. It works in general case, but sometimes "if" statement
is passed through the condition to next point even if condition is true.

Here is the code:

# ...

set %prize=0
sql "select do_gambling()"
read table=#sql %prize
slog "prize=%prize prize=%prize.value prize.type=%prize.type"
 
if %prize.value > 0 or %prize .ne. "0" ::you_win
goto ::you_loose
endif
 
# ...

Sometimes slog shows me that prize > 0 but "if" passes through to "goto
::you_loose". I have changed "if" conditions many times but the bug
still remain.

dx(6): gamble::do_gamble(6): prize=0 prize=0 prize.type=string
...
dx(6): gamble::do_gamble(6): prize=300 prize=300 prize.type=string


Anton Dedov




reply via email to

[Prev in Thread] Current Thread [Next in Thread]