Charlie Reinl ha scritto: > 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 > > You are right; the final part of that long statement was not visible. But I tried to write a statement that long (7211 lines!), and the error from the compiler was "Endif missing ...". So it is still a mistery...
Regards, Doriano ------------------------------------------------------------------------------ _______________________________________________ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user