Dear user of ftp.gwdg.de, we will have a scheduled downtime for FTP

at July, 22nd from 7am approx. till 4pm

BREXX, Data Convert Functions
Previous Top Index Next

Data Convert Functions

B2X(string)

Binary to Hexadecimal
b2x('01100001') /* 'a' */

BITAND(string1[,[string2][,pad]])

logically AND the strings, bit by bit
bitand('61'x,'52'x) /* '40'x */
bitand('6162'x,'5253'x) /* '4042'x */
bitand('6162'x,,'FE'x) /* '6062'x */

BITOR(string1[,[string2][,pad]])

logically OR the strings, bit by bit

BITXOR(string1[,[string2][,pad]])

logically XOR the strings, bit by bit

C2D(string[,n])

Character to Decimal. The binary representation of string is converted to a number (unsigned unless the length n is specified).
c2d('09'x) /* 9 */
c2d('ff40') /* 65344 */
c2d('81'x,1) /* -127 */
c2d('81'x,2) /* 129 */

C2X(string)

Character to Hexadecimal
c2x('abc') /* '616263' */
c2x('0506'x) /* '0506' */

D2C(wholenumber[,n])

Decimal to Character. Return a string of length n, which is the binary representation of the number.
d2c(5) /* '5'x */
d2c(97) /* 'a' */

D2X(wholenumber[,n])

Decimal to Hexadecimal. Return a string of length n, which is the hexadecimal representation of the number.
d2x(5) /* '05' */
d2x(97) /* '61' */

B2X(string)

Hexadecimal to Binary
x2b('a') /* '01100001' */

X2C(string)

Hexadecimal to Character
x2c('616263') /* 'abc' */

X2D(hex-string[,n])

Hexadecimal to Decimal. hex-string is converted to a number (unsigned unless the length n is specified)
x2d('61') /* 97 */


Previous Top Index Next