Re: Strings into numbers... whee!
- Posted by "Thomas Parslow (PatRat)" <patrat at rat-software.com> Jan 07, 2001
- 526 views
> Heya all! > Okay, heres the deal: I want to turn hex {"F", "F"} into its absolute, > 255. I asked my dad about this, however he knows more about this > than I do... in languages other than euphoria. I looked for this > "hex()" command he claimed Euphoria should do that BASIC does, > however I haven't found it. > So, how can I do this in Euphoria? > TIA, > --"LEVIATHAN" Try the value() function in get.e: include get.e constant HEX_STRING="FF" sequenced ret ret = value("#" & HEX_STRING) --Ret now contains {0,255} The first element of the sequence is an --error code, 0 means GET_SUCCESS and the second is the value ? ret[2] Thomas Parslow (PatRat) ICQ #:26359483 Rat Software http://www.rat-software.com/ Please leave quoted text in place when replying