[Gambas-user] (no subject)

Doriano Blengino doriano.blengino at ...1909...
Wed Apr 1 16:51:39 CEST 2009


vlahonick vlahonick ha scritto:
> Thanks you all for your replies....
> For those that they propuse me to put "end if" at the end of the code of course i did that!!!!
> In the screenshot i send you all it was just a part of the code,the theme of the screenshot was to show u the error.
> If i didnt close the code with as many end if were needed the language itself would give me other error that end if are needed.
> The code i wrote was completely correct,i double-triple checked it...
> In the screenshot i repeat is just a very small part of my code because i want u to see the error and not the code...
>   
---
> Anyway i tried to rewrite my code with the Select Case expression but is more difficult because there are many cases and ONLY
> one have to be triggered per time and which case should be triggered depends from what the user will wirte...
>   
...but this is exactly what a SELECT (in gambas) does... only one branch 
is executed! Differently from C, where from one branch you can "fall" in 
the next, here you don't have to worry about terminating your branches 
with "break".

Different is if you modify the initial value inside a branch, and then 
you want the test to be performed again:

    if avalue="a" then avalue="A"
    if avalue="A" then avalue="B"

You can't do that in a SELECT, and this is what you seem to want.

Regards,
Doriano





More information about the User mailing list