I am trying to get the these values into this command line but I am unable to work out how to represent a HEX value.
I bet it is easy when you know how.
I hope that the following routines, written by Doug Hennig, would help you:
Decimal2Hex:
------------------------------
*==============================================================================
* Function: Decimal2Hex
* Purpose: Convert a decimal number to a hex string
* Author: Doug Hennig
* Copyright: (c) 2000 Stonefield Systems Group Inc.
* Last Revision: 11/02/2000
* Parameters: tnValue - the decimal value
* tnPlaces - the number of places needed (optional: if it
* isn't specified, 4 is used)
* Returns: the hex string
* Environment in: none
* Environment out: none
*==============================================================================
lcOut = ''
for lnI = 1 to lnPlaces
lcOut = lcOut + substr(lcHex, lnPlaces - lnI + 1, 1)
next lnI
return lcOut
-----------------------
and Hex2Decimal
-----------------------
*==============================================================================
* Function: Hex2Decimal
* Purpose: Converts a value in Intel format to a decimal value
* Author: Doug Hennig
* Copyright: (c) 2000 Stonefield Systems Group Inc.
* Last Revision: 11/02/2000
* Parameters: tcValue - the value to convert
* tlSigned - .T. if the value is signed
* Returns: the numeric value
* Environment in: none
* Environment out: none
*==============================================================================
In VFP, you can use hex numbers directly by prefacing them with 0x (zero ex). So "msg1=&H400" (as you'd write it in Visual Basic) would be "msg1=0x400" in VFP.
Rick
Note to Grigore: It's consider at least "bad taste" to post Copyrighted code without the express consent of the author. In fact in the US it could even be grounds for a law suit. Although I want to make it clear that I'm NOT speaking for Doug Hennig in this case.
Not to mention anything that Dolghin had violated or not (the copyright laws) ...
It is my humble suggestion to Dolghin and other members ..
1. we can copy the thread when we download such codes and keep it at the head of the routines.
2. When we want to help others, we can just put the link in the public .. so that any one can reach that.
3. People who cannot follow the thread, can make personal communication and get things sorted out by the helping members.
However I appreciate Dolghin for having a straingt thinking for helping the community. It is only the safeguard I suggested and not for starting any controversy.
I also appreciate Rick for posting his comments and I understand he did neither start a controversy.
Hey guys, guys, guys!
I only asked a question and a few of you were good enough to reply and for this I am grateful but have a heart.
While you are carrying on your discussions on the whys and wherefores of what is right and what is wrong, I am receiving numerous E-mails telling me of a reply to my post. I get there and find the message isn`t for me.
Be gentle there are only so many hours in a day.
Hi all my friends,
For Grigore, You may not violate any of Doug's copyright, but you just violated his human rights by calling him '" itself" just kidding.
For WebPager, there is an option to remove this thread from your mailing notification, " Be gentle there " and use it.
But don't prevent us from responding to each other, being the one who started this thread, it doesn't mean that you own it.
Walid Magd
Engwam@Hotmail.com
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.