Changes

Jump to: navigation, search

Locomotive BASIC

733 bytes added, 16:19, 2 January 2019
/* Functions */
</pre>
==== <code>COPYCHR$ (#st)</code> ====
: Copies character FUNCTION: COPies a CHaRacter from the current position in specified the stream(which MUST be specified). The below program copies a character from location 1,1 (top left), and reproduces it at location 1,20.: If the character read is not recognized, a null string is returned: Associated keywords: LOCATE : Example:<pre>10 CLS20 PRINT "top corner"30 LOCATE 1,140 a$=COPYCHR$(#0)50 LOCATE 1,2060 PRINT a$</pre>
==== <code>COS (n)</code> ====
: Returns cosine FUNCTION: Calculates the COSinus of the <numeric expression> (n in ).: Note that DEG and RAD can be used to force the result of the below calculation to degrees or radians (se respectively. : Associated keywords: ATN, DEG and , RAD, SIN : Example:<pre>DEGPRINT COS(45) 0.707106781</pre>
==== <code>CREAL (n)</code> ====
: Converts integer FUNCTION: Returns the value of the <numeric expression> (n ), Converting it to real numeric variableREAL. : Associated keywords: CINT : Example:<pre>10 a=PI20 PRINT CINT(a)30 PRINT CREAL(a)run 3 3.14159265</pre>
==== <code>DEC$(n, format)</code> ====
205
edits