17.07.2013 Views

GWBASIC User's Manual

GWBASIC User's Manual

GWBASIC User's Manual

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

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

CDBL Function<br />

Purpose:<br />

To convert x to a double-precision number.<br />

Syntax:<br />

CDBL(x)<br />

Comments:<br />

x must be a numeric expression.<br />

Example:<br />

10 A=454.67<br />

20 PRINT A; CDBL(A)<br />

RUN<br />

454.67 454.6700134277344<br />

Prints a double-precision version of the single-precision value stored in the variable named A.<br />

The last 11 numbers in the double-precision number have no meaning in this example, since A<br />

was previously defined to only two-decimal place accuracy.<br />

Note<br />

See the CINT and CSNG functions for converting numbers to integer and single precision,<br />

respectively.<br />

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

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

Saved successfully!

Ooh no, something went wrong!