> From: karl.re...@fen-net.de
> To: gambas-user@lists.sourceforge.net
> Date: Wed, 1 Apr 2009 17:16:38 +0200
> Subject: Re: [Gambas-user] (no subject)
>
> Am Mittwoch, den 01.04.2009, 17:06 +0300 schrieb vlahonick vlahonick:
> > 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...
> > I didnt really succeded to do that with the Select Case expression.
> > So here i give u an example and if someone could help me by writing the
> > same example with the select case expression it will be very helpful.
> >
> > PUBLIC SUB Button1_Click
> >
> > if textbox1.text = "a" then
> > textbox2.text = "b"
> > else
> > if textbox1.text = "b" then
> > textbox2.text = "g"
> > end if
> > end if
> >
> > END
> >
> > (like the example is my program's code-and the events are triggered when
> > the user press the OK button)
> >
> > ty in advance again...:D
>
> Salut,
>
> first: tell us what version of Gambas you are using.
> second: am I right, you are writing a kind of CONVERTER ?
>
> if so this is what I would write quickly.
>
> FUNCTION myConvert(sInChar AS String) AS String
> DIM sRetChar AS String = sInChar ' makes the return value to the given
> value
> ' now make you changes
> IF sInChar = "a" THEN sRetChar = "0"
> IF sInChar = "b" THEN sRetChar = "1"
> IF sInChar = "c" THEN sRetChar = "2"
> IF sInChar = "d" THEN sRetChar = "3"
> IF sInChar = "e" THEN sRetChar = "4"
> IF sInChar = "f" THEN sRetChar = "5"
> IF sInChar = "g" THEN sRetChar = "6"
> IF sInChar = "h" THEN sRetChar = "7"
> IF sInChar = "i" THEN sRetChar = "8"
> IF sInChar = "j" THEN sRetChar = "9"
> IF sInChar = "0" THEN sRetChar = "a"
> IF sInChar = "1" THEN sRetChar = "b"
> IF sInChar = "2" THEN sRetChar = "c"
> IF sInChar = "3" THEN sRetChar = "d"
> IF sInChar = "4" THEN sRetChar = "e"
> IF sInChar = "5" THEN sRetChar = "f"
> IF sInChar = "6" THEN sRetChar = "g"
> IF sInChar = "7" THEN sRetChar = "h"
> IF sInChar = "8" THEN sRetChar = "i"
> IF sInChar = "9" THEN sRetChar = "j"
> RETURN sRetChar
> END
>
> I attached you a test.
>
> --
> Amicalment
> Charlie
I tried your test and it was really what i need :D
Faster in code with less writing and more simple :D
But when i try to modify it and put instead of number greek latters and then i
run the program
the result in text box 2 is some boxes like |X|...so this means that for some
reason the program doesnt respawn in greek or doesnt understand them?
How i can modify the code?
ty a lot
_________________________________________________________________
News, entertainment and everything you care about at Live.com. Get it now!
http://www.live.com/getstarted.aspx
------------------------------------------------------------------------------
_______________________________________________
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user