[Gambas-user] SELECT CASE... without TO?

Eilert eilert-sprachen at ...221...
Tue Jun 7 15:35:43 CEST 2005


Benoit Minisini schrieb:
> On Tuesday 31 May 2005 11:59, Eilert wrote:
> 
>>Is it possible that the CASE instruction does not know a TO range?
>>
>>I had
>>
>>SELECT CASE Val(t$)
>>
>>CASE 1 TO 19
>>
>>...
>>
>>END SELECT
>>
>>and it says "End of line expected" for the line with the CASE.
>>
>>If TO is not implemented, what would you use here instead?
>>
>>Thanks for your help.
>>
>>Rolf
>>
> 
> 
> I add that in the TODO list. Use IF...THEN...ELSE IF...ENDIF instead. It 
> compiles to exactly the same code.
> 
> Regards,
> 

Thanks, would be nice to have. The
IF blabla > x and blabla < y THEN

doesn't look as clean as a simple

CASE x TO y

although it means the same.

By the way, I've proceeded rather far with my big project in Gambas, and 
it looks better than the original VB app and it performs much better. A 
lot of minor work is still to be done, but the overall functionality is 
already there. It's real fun to program in Gambas, and the results are 
convincing.

Rolf





More information about the User mailing list