Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Perl > Perl Misc > hex file

Reply
Thread Tools

hex file

 
 
lily12a@gmail.com
Guest
Posts: n/a
 
      07-20-2006
Hello,

Please help if anyone knows. I would highly appreciate it. This is my
question.

Input array will include values: 4C, 49, 4C, 59
How to assign these values in to an array of hex value.

Thanks,

 
Reply With Quote
 
 
 
 
David Squire
Guest
Posts: n/a
 
      07-20-2006
http://www.velocityreviews.com/forums/(E-Mail Removed) wrote:
> Hello,
>
> Please help if anyone knows. I would highly appreciate it. This is my
> question.
>
> Input array will include values: 4C, 49, 4C, 59
> How to assign these values in to an array of hex value.
>


What have you tried?
 
Reply With Quote
 
 
 
 
usenet@DavidFilmer.com
Guest
Posts: n/a
 
      07-20-2006
(E-Mail Removed) wrote:

> Input array will include values: 4C, 49, 4C, 59
> How to assign these values in to an array of hex value.


Those appear to already be hex values...

By the way, you may find this info interesting:
http://www.augustmail.com/~tadmc/clp...uidelines.html

--
David Filmer (http://DavidFilmer.com)

 
Reply With Quote
 
Dave Weaver
Guest
Posts: n/a
 
      07-21-2006
(E-Mail Removed) <(E-Mail Removed)> wrote:
>
> Please help if anyone knows. I would highly appreciate it. This is my
> question.
>
> Input array will include values: 4C, 49, 4C, 59
> How to assign these values in to an array of hex value.


Those are already hex values!

Your question is too vague - please see the posting guidelines that
are posted to this group regularly.

Perhaps you mean something like this:

my @input_array = qw(4C 49 4C 59);
my @values = map { hex $_ } @input_array;

But perhaps not. Your question needs to be clearer.

 
Reply With Quote
 
Tad McClellan
Guest
Posts: n/a
 
      07-21-2006
Dave Weaver <(E-Mail Removed)> wrote:
> (E-Mail Removed) <(E-Mail Removed)> wrote:



>> Input array will include values: 4C, 49, 4C, 59
>> How to assign these values in to an array of hex value.

>
> Those are already hex values!



They cannot be hex values, because there is no such thing as a hex value.

The abstract concept of a "number" is difficult for us humans to
discuss, so we have come up with a number of different *representations*
(numeral systems) for talking about any particular number.

1010 # 2
12 # 8
10 # 10
A # 16

Those are all _different_ representations for the _same_ number.

So

Those are already represented in hex!

would have been a more accurate rejoinder.


[ snip code that converts base-16 to base-10 ]


> Your question is too vague



Right. I'm sure you know all of the above, but I hope that it will
help the OP compose an answerable question.


--
Tad McClellan SGML consulting
(E-Mail Removed) Perl programming
Fort Worth, Texas
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
hex string to hex value tim Python 8 11-23-2005 06:27 PM
[Fwd: Re: hex string to hex value] tim Python 2 11-23-2005 07:18 AM
Hex Color Codes - Hex 6 <=> Hex 3 lucanos@gmail.com HTML 10 08-18-2005 11:21 PM
hex value in string back to real hex value jack Python 4 09-08-2004 07:11 AM
hex(-5) => Futurewarning: ugh, can't we have a better hex than '-'[:n<0]+hex(abs(n)) ?? Bengt Richter Python 6 08-19-2003 07:33 AM



Advertisments