MKI$()
This page was last modified 23:28, 2 June 2020 by Mars2000you. Based on work by NYYRIKKI.

Contents

Effect

Returns the original value of an integer number after conversion into a 2-character string.

It does not change the actual memory bytes that makes up the original variable value, so the value is directly converted into two "random" characters.

Notes:

  • This function is useful when using files in random access on disk, because the converted value will take less space in the record buffer.
  • Following statement is true: (unless values cause overflow): MKI$(D)=CHR$(DAND255)+CHR$(D\256)
  • The counter function is CVI().

Syntax

MKI$(<NumberExpression>)

Parameter

<NumberExpression> is an expression, variable or value that can be interpreted as integer number. Don't use a number that is greater than 32767 or you will get an 'Overflow' message error.

Example

D=29474: D$=MKI$(D): PRINT D$
"s

Related to

CVD(), CVI(), CVS(), LSET, MKD$(), MKS$(), RSET, VARPTR()

Compatibility

Disk BASIC 1.0 or higher