17.07.2013 Views

GWBASIC User's Manual

GWBASIC User's Manual

GWBASIC User's Manual

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

GW-BASIC <strong>User's</strong> Guide<br />

MKI$, MKS$, MKD$ Functions<br />

Purpose:<br />

To convert numeric values to string values.<br />

Syntax:<br />

MKI$(integer expression)<br />

MKS$(single-precision expression)<br />

MKD$(double-precision expression)<br />

Comments:<br />

MKI$ converts an integer to a 2-byte string.<br />

MKS$ converts a single-precision number to a 4-byte string.<br />

MKD$ converts a double-precision number to an 8-byte string.<br />

Any numeric value placed in a random file buffer with a LSET or a RSET statement must be<br />

converted to a string (see CVI, CVS, CVD, for the complementary functions).<br />

These functions differ from STR$ because they change the interpretations of the bytes, not the<br />

bytes themselves.<br />

Examples:<br />

90 AMT=(K+T)<br />

100 FIELD #1, 8 AS D$, 20 AS N$<br />

110 LSET D$=MKS$(AMT)<br />

120 LSET N$=A$<br />

130 PUT #1<br />

.<br />

.<br />

.<br />

file:///C|/Documents%20and%20Settings/Lorenzo/Desktop/GW%20Basic/MKIS.html28/03/2004 21.29.20

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!