MKBYT$, MKCUR$, MKCUX$, MKD$, MKDWD$, MKE$, MKI$, MKL$, MKQ$, MKS$ and MKWRD$ functions

Purpose

Converts a numeric  value into an ANSI string.

Syntax

AnsiStringVar$ = MKBYT$(byte_expr)

AnsiStringVar$ = MKCUR$(currency_expr)

AnsiStringVar$ = MKCUX$(extended_currency_expr)

AnsiStringVar$ = MKD$(double_precision_expr)

AnsiStringVar$ = MKDWD$(double_word_expr)

AnsiStringVar$ = MKE$(extended_precision_expr)

AnsiStringVar$ = MKI$(integer_expr)

AnsiStringVar$ = MKL$(long_integer_expr)

AnsiStringVar$ = MKQ$(quad_integer_expr)

AnsiStringVar$ = MKS$(single_precision_expr)

AnsiStringVar$ = MKWRD$(word_expr)

Remarks

The MKx functions return the binary representations of a number as a set of bytes in an ANSI string.  Do not confuse these functions with the STR$ or FORMAT$ functions, which return a printable string.

In all but the most extreme cases, the returned string should only be stored as an ANSI string or UDT which consist of single bytes.  WIDE (Unicode) strings consist of a series of 2-byte words which will generally yield undefined results.

The CVx functions are complementary to the MKx functions.  They convert the binary representation in a string to an actual numeric value:

Function

Converts to

From

MKBYT$

1-byte string

Byte

MKCUR$

8-byte string

Currency

MKCUX$

8-byte string

Extended-currency

MKD$

8-byte string

Double-precision

MKDWD$

4-byte string

Double-word

MKE$

10-byte string

Extended-precision

MKI$

2-byte string

Integer

MKL$

4-byte string

Long-integer

MKQ$

8-byte string

Quad-integer

MKS$

4-byte string

Single-precision

MKWRD$

2-byte string

Word

 

See also

CVI and associated functions