On 03/27/2010 12:43 AM, Duaine Hechler wrote:
Here is functions in REXX:
C2X(), C2D(), D2C() and X2C() will be effected by the character set of your computer since they convert to or from characters. Note that if C2X() and C2D() get their first parameter as a binary or hexadecimal literal, the result will be unaffected by the machine type. Also note that the functions B2X(), X2B(), X2D() and D2X() are not effected by the character set, since they do not use character representation.
C2X = char to hex
C2D = char to decimal
plus in reverse
B2X = binary to hex
B2D = binary to decimal
plus in reverse
Are there any equals in any other language ?
If not - then here is why I - LOVE - REXX
Duaine, From the command line, look at 'bc', 'ibase' and 'obase' which can pretty much do what you need. Also, there was a scriptable program (calc I believe) that provided a swiss-army-knife of math functions and base conversions to the command line. All are relatively fast. -- David C. Rankin, J.D.,P.E. Rankin Law Firm, PLLC 510 Ochiltree Street Nacogdoches, Texas 75961 Telephone: (936) 715-9333 Facsimile: (936) 715-9339 www.rankinlawfirm.com -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org