[Gambas-user] Questions about SELECT statement

nando nando_f at ...951...
Thu Apr 21 02:02:37 CEST 2005


Does the SELECT test the value only once at the beginning?

a=""
SELECT x 

  CASE 1
          a = a & "HELLO 1"

  CASE 2  
          a = a & "HELLO 2"

  CASE 3
          a = a & "HELLO 3"
          INC x

  CASE 2,4
          a = a & "HELLO 4"

END SELECT

Questions:
(1) if x was 3 then the CASE 3 will execute but x will INC
    so then will it go into CASE 2,4 ?

(2) if x was 2 will both cases for 2 be executed?

(3) if BREAK used to exit the SELECT statement?

Thanks
-Fernando






More information about the User mailing list