How to convert from string to hex number
I have a requirement for passing a hex value like this to a function.
my $ipmbAddress = getIpmbAddress(...); ## returns 82
Here in the above code, the getDeviceID() fucntion will accept only
0x82 (hex number). How to convert the number 82 to 0x82 (Note that
this should not be as string)
I tried the following but not working properly.
$ipmbAddress = "0x".$ipmbAddress;
$ipmbAddress = hex("$ipmbAddress");
$ipmbAddress = sprintf(0x%0x, $ipmbAddress);
T...how to convert hex string to hex bytes?
Hi I've been trying and haven't found a solution for this yet and hopefully some of you can give me a direction to solve this problem.
I have a string in hex representation i.e, 64 chars 'AB23FFFE.....'
How can I convert it to 32 chars String where each byte is $AB $23 $FF $FE .... ?
Even if I do it manually, can I store the hex(non ASCII) to String?
Thanks for looking!!
> I have a string in hex representation i.e, 64 chars 'AB23FFFE.....'
> How can I convert it to 32 chars String where each byte is $AB $23 $FF
> $FE .... ?
Th...How to convert a hexadecimal number to normal number?
In VB.NET, how can I convert a hexadecimal number (like FF) to normal number (like 255) ??
Come on, gurus, this must be a piece of cake for you!:-)
Any help appreciated, thanks, Hooker
try to use System.Convert.ToInt16(your parameter)
hope this work...if this doesn't work there should be some method in the 'convert' class.Toronto Trade show displays | Toronto Printing Solutions | Toronto Printing...problem with number/number=number ?
i need for below
1/36 = 0,0277777777777778 but result should be 1
3/36 should be 1
35/36 should be 1..... (between 1 and 36)/36 should be 1
36/36 and 37/36 and 45/36 and 71/36 should be 2
(between 72 and 37)/36 should be 2
(between 107 and 73)/36 should be 3 and go on
how can i do it ?
ThanksMark as me if my question or my answer can be helpful for you :)
I think that
(int)(n / 36) + 1
will do the trick
it work true without below result 1 for 1/36 and 4 /36 and 35 /36 .. it is true.. but
result 2 for 36/36 . res...What generals generally do
Reading a McChrystal thread elsewhere, I came across someone quoting a
> I spent 33 years and four months in active military service and
> during that period I spent most of my time as a high class thug for
> Big Business, for Wall Street and the bankers. In short, I was a
> racketeer, a gangster for capitalism. I helped make Mexico and
> especially Tampico safe for American oil interests in 1914. I helped
> make Haiti and Cuba a decent place for the National City Bank boys to
> collect revenues in. I ...Converting to Hex
Is there a simple way, like a one liner perhaps, that will give me the
octal/hex value of a character? I need to look certain characters up,
so I would like to be able to give it something like an 'a' or even
"\n" and have it answer 141 or 012 (assuming UNIX). Thanks for your
check out sprintf() and ord()
quickly for you example:
perl -e 'printf("%x", ord("\n"))'
perl -e 'printf("%o", ord("\n"))'
> -----Original Message-----
> From: James Edward Gray II [m...VB.NET: How to convert hexadecimal number to normal (decimal) number?
Hi to all
VB.NET function Hex() converts numbers to hexadecimal strings, is there any reverse function that converts hexadecimals back to numbers??
Hi, how are you?
In C#, we have something like:
Convert.ToInt32(string strValue, int Base)...
So I basically can do:
Int iDecimal = Convert.ToInt32("AF8", 16);
I'm pretty sure there must be something like it on VB.Net.
Hope this Helps,
Covohttp://covodev.blogspot.com/"Everything should be made as simple as possible, but not simpler", A. Einstein
That should work, thanks.
I'm fine, BTW...PowerBuilder number
I have received "438" for resultcode when I using a OLEOBJECT function in
PB. According to the help, resultcode is a UnsignedLong by value (a
PowerBuilder number identifying the exception that occurred on the server).
Does anyone know where I can get the meaning of 438. Thx.
According to my research, 438 means: object dosen't support property or method.
Which function were you calling and what are you trying to accomplish? Are you
sure the OLE Server has been started?
On Wed, 18 Jun 2003 05:57:59 -0400,
<GL> wro...Convert from hex
perl -e '
Why does print not print the hex character in question?
-bash-2.05b$ perl -e '
http:/...When is a number not a number?
I've got some server script that determines the "SELECTED" entry in a SELECT
control. (The code below is a snippet.) If no information is returned then
I want the number defaulted a hard-coded value, otherwise, I want number
that matches the returned value selected. The defaulted, hard-coded value
works but the comparison (i == val) doesn't work if a a value was returned
in the information. I've verified that it is indeed a number within the
range I want.
Why would this comparison fail like this?
if (docInfo.advPayMonths =...Converting current code (Powerbuilder 6.5.1) to newest version of Powerbuilder?
Hi, can anyone tell me what you have to do in order to convert existing code
(applications) (created under Powerbuilder 6.5.1) to the newest version of
Powerbuilder (at least PB 8) and what it would take to use that code
(applications) on the web, I do understand that the newer versions of PB
have a web datawindow, is that all we would need to use to move our
applications to the web?
Look in this newsgroup aroung 01/08/02 for "Applications on the Web"
(started by "John") for a good stream of information.
JKerstens <John.Kerstens@gnb.ca> wrot...convert number to text
I have to convert number to text (100 -> hundred)
is there any one who know where to find a function to do that
I dont think that there is such a function, but who knows
but you can make one your self!
Start by deciding how large numbers you want to handle
for ex max is one million
then you know you have six digits to handle
This would render the text
onemillion twohundredthirtysixthousend onehundredtwentythree
or a format you prefer
Start by picking out the lengt of the string
lets just st...convert number to word
Can any one help me ? How to convert number to word?
ie., 123......means .........one hundereden twenty three.
"Preeth" <firstname.lastname@example.org> �������/�������� � �������� ���������:
> Can any one help me ? How to convert number to word?
> ie., 123......means .........one hundereden twenty three.
> I use computed field
>Can any one help me ? How to convert number to word?
>ie., 123.........convert string to number?
I have a problem where a number read from a file is being treated as a
string by perl (I think!). I am using the module RSPerl which is an
interface between Perl and the statistical language R. When i read a
column of numbers from a file and pass it to the perl/R function i get
an "invalid 'type' (character) of argument" error.
The reason i think this is a problem on the Perl side is shown by this
... stuff to extract $value from each row ...
@list2 = (100.2, 232.333, 344.2); # these ...