1. 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

new topic     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu