[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Bayonne-devel] "if" statement occasionaly does not work.
From: |
Luca Bariani |
Subject: |
Re: [Bayonne-devel] "if" statement occasionaly does not work. |
Date: |
Mon, 1 Nov 2004 10:49:10 +0100 |
User-agent: |
KMail/1.7.1 |
you always go to ::you_loose or sometimes you go to ::you_win?
I usually use
if condition
then
.....
else
....
endif
of
if condition
then
.....
endif
> 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
>
>
> _______________________________________________
> Bayonne-devel mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/bayonne-devel
--
Luca Bariani - address@hidden
http://www.ferrara.linux.it/Members/lucabariani
http://www.bayonne.it
ICQ: 29828855 ---- Pgp/Gpg public key available on Home Page
###############################################################
The reasonable man adapts himself to the world.
The unreasonable man persists in trying to adapt the world to himself.
Therefore all progress depends on the unreasonable.