1. Re: Text to Number
- Posted by rforno at tutopia.com Apr 24, 2002
- 377 views
You should use the value() function. ----- Original Message ----- From: <2anmagudi at infovia.com.ar> To: "EUforum" <EUforum at topica.com> Subject: Re: Text to Number > > > > > How does one convert a text sequence to a number in Euphoria? > > > > In working with EX07.EXW in the Win32 examples, text entered by the user > > in the dialog box Sle1 is retrieved using the function getText(). I > > assume this returns a sequence of ASCII characters. If I want to confine > > the user's input to a numeric range from 0 to n, how do I do this? In > > BASIC we would use a = VAL(x$). > > > > Thank you. > > > > that's what i think you're trying to explain you can't do and there is the > answer: > > sequence xs, junk > integer xi > > xs = "341.7" -- the value as a sting > junk = value(xs) -- i'm taking the value of xs > xi = junk[2] -- value() returns a sequence -> {ERRORLEVEL,VALUE} > > it should helps you... > > Best Regards, > Gustavo Bottegoni > AKA: Philip > > > >