Changes

Locomotive BASIC

617 bytes added, 22:06, 30 December 2018
/* Functions */
==== <code>ABS (n)</code> ====
: FUNCTION: Returns the absolute ABSolute value of the given numeric expression (n by ignoring the sign value, ). This means that means a negative value will be changed in a numbers are returned as positive one.: Similar commandsAssociated keywords: SGN
: Example
==== <code>ASC (s)</code> ====
: FUNCTION: Returns ASCII code number the numeric value of the first character of in the <string expression> (s).: Similar commandsAssociated keywords: CHR$
: Example:
==== <code>ATN (n)</code> ====
: FUNCTION: Returns Calculates the arctangent Arc-TaNgent of the <numeric expression> (n).: The result Note that DEG and RAD can be changed into radian or angular measure with used to force the commands DEG result of the below calculation to degrees or RADradians respectively.
: Similar commandsAssociated keywords: COS, DEG, RAD, SIN, TAN
: Example:
==== <code>BIN$ (i1,[i2])</code> ====
: Returns binary representation FUNCTION: Produces a string of i1 between -32768 and 65535. The BINary digits respresenting the value of the <unsigned integer expression>, using the number of binary digits (0s and 1s) is specified instruced by i2 the second <integer expression> (in the range of 0-to 16). If the number of digits instructed is too great, the resulting expression will be filled with leading zeros; if the number of digits instructed is too small, the resulting expression will NOT be shortened to the instructed number of digits, but will produced in as many digits as are required.The <unsigned integer expression> to be converted into binary form must yield a value in the range -32768 to 65535.: Associated keywords: DEC$, HEX$, STR$
: Example:
<pre>
PRINT BIN$(66,8) - prints 0100001001000000
</pre>
:Does AMSDOS has already given out a failure then Bit 7 will be set. That means add 128 decimal to DERR code.
* '''Unknown error''' - Executing <code>ERROR</code> command with any other legal error code number (up to 255).
 
 
== Other Basic Dialects available for the CPC ==
205
edits