1. Sequence-to-number question
- Posted by Doug Cox <cox.family at SK.SYMPATICO.CA> Jul 21, 1999
- 291 views
Dear Euphorians, I was wondering if anyone would be able to give me a hand with this -- I've been working on a program lately that takes strings of values from a file and reads them into seperate sequences. (part of a larger project) I've hit a stumbling block, however, when I want to use these broken-up sequence parts as normal numbers. (i.e. atoms/integers, depending) Here's an example: * I have a sequence that looks something like this: {{48,49},{48,50},{48,51},...} I'd like to be able to use each of these sets of numbers as a hex value (i.e. {48,49} = #01) so that I can do math with them as necessary, so that in the end, it looks more like this: {{#01},{#02},{#03},...} If anyone can offer help here, it would be much appreciated. Thanks again, Chris Cox cox.family at sk.sympatico.ca
2. Re: Sequence-to-number question
- Posted by "Brett Pantalone (EUS)" <EUSBAPA at AM1.ERICSSON.SE> Jul 21, 1999
- 289 views
- Last edited Jul 22, 1999
Hi Chris, Take a look at the VALUE function that is part of the built-in Euphoria library. I think that will do what you want. -- Brett > -----Original Message----- > From: Doug Cox [SMTP:cox.family at SK.SYMPATICO.CA] > Sent: Wednesday, July 21, 1999 4:48 PM > To: EUPHORIA at LISTSERV.MUOHIO.EDU > Subject: Sequence-to-number question > > Dear Euphorians, > > I was wondering if anyone would be able to give me > a hand with this -- I've been working on a program > lately that takes strings of values from a file and > reads them into seperate sequences. (part of a larger > project) I've hit a stumbling block, however, when I > want to use these broken-up sequence parts as normal > numbers. (i.e. atoms/integers, depending) Here's an > example: > > * I have a sequence that looks something like this: > {{48,49},{48,50},{48,51},...} > > I'd like to be able to use each of these sets of numbers > as a hex value (i.e. {48,49} = #01) so that I can do > math with them as necessary, so that in the end, it looks > more like this: > > {{#01},{#02},{#03},...} > > If anyone can offer help here, it would be much appreciated. > Thanks again, > > > Chris Cox > cox.family at sk.sympatico.ca