[Gambas-user] (no subject)

Charlie Reinl Karl.Reinl at ...9...
Tue Mar 31 22:54:24 CEST 2009


Am Dienstag, den 31.03.2009, 22:23 +0200 schrieb Doriano Blengino:
> Charlie Reinl ha scritto:
> > Salut, 
> >
> > you have to close 'If Then Else' by an 'Endif'
> > Or you could write :
> >
> > If TextBox1.Text = "T" then TextBox2.Text = "T"
> > If TextBox1.Text = "Y" then TextBox2.Text = "I"
> >   
> If it is so, then the gambas parser has a problem:
> 
>     if textbox1.text="0" then
>       ' now a endif is expected...
>     else    ' where does this "else" bind to?
> 
> ...and the message "too many nested control structure" is completely 
> misguiding.
> 
> Regards,
> 
Salut,

you have to close 'If Then Else' by an 'Endif' .. I said!

if textbox1.text="0" then
	' do something for "0"
Else if textbox1.text="1" then 
	' do something for "1"
Else
	' do something for all others (then "0" and "1")
End if  '<---------------- close your control structure

-- 
Amicalment
Charlie





More information about the User mailing list