Changes

Jump to: navigation, search

Locomotive BASIC

1,216 bytes added, 13:20, 17 January 2019
/* Functions */
========================================================================================
</pre>
: '''Example for ERR 31 / 32''':
<pre>
10 ON ERROR GOTO 1000
: ''BASIC 1.0 & 1.1''
: '''FUNCTION''': The JOY function reads a bit significant result from the joystick in the <integer expression> (either 0 or 1).
 
<pre>
================================
run
</pre>
 
==== <code><big>LEN (<string expression>)</big></code> ====
: ''BASIC 1.0 & 1.1''
run
</pre>
==== <code><big>LOG (n<numeric expression>)</big></code> ====''BASIC 1.0 & 1.1'': '''FUNCTION''': Calculates the natural LOGarithm (base of ''e'') of <numeric expression> which mustbe greater than zero.
: Returns the natural logarithm (to base e) of n.'''Associated keywords''': EXP, LOG10
: '''Example''':<pre>PRINT LOG(9999) 9.21024037</pre>==== <code><big>LOG10 (n<numeric expression>)</big></code> ====''BASIC 1.0 & 1.1'': '''FUNCTION''': Returns the logarithm to base 10 of <numeric expression> which must be greater than zero.
: Returns the logarithm to base 10 of n.'''Associated keywords''': EXP, LOG
: '''Example''':<pre>PRINT LOG10(9999) 3.99995657</pre>==== <code><big>LOWER$ (se<string expression>)</big></code> ====''BASIC 1.0 & 1.1'': '''FUNCTION''': Returns a new string expression which is a copy of the specified <string expression> but in which all alphabetic characters in the range A to Z are converted to lower case. Useful for processing input where the answers may come in mixed upper/lower case.
: Returns a copy of se in which all alphabetical characters are converted to lower case (see also UPPER) '''Associated keywords''': ExampleUPPER$
: '''1. Example''':
<pre>
A$="AMSTRAD":PRINT A$="AMSTRAD":PRINT LOWER$(A$)
Amstrad
</pre>
: '''2. Example''':
<pre>
10 a$="SEE HOW THE LETTERS CHANGE TO ... NUMBERS 1234 NOT..."20 PRINT LOWER$(a$+"A1B2c3LOWER CASE") - print a1b2c3 see how the letters change to ... numbers 1234 not... LOWER CASE
</pre>
==== <code><big>MAX (<list of: numeric expression>)</big></code> ====
''BASIC 1.0 & 1.1''
: '''FUNCTION''': Returns the MAXimum value from the <list of: numeric expression>s.
==== <code>MAX (list of n)</code> ==== : Returns the maximum value from the given list. : Example'''Associated keywords''':MIN
: '''Example''':
<pre>
10 n=6620 PRINT MAX(31,8n,253,16,24,93) - prints 25run 66
</pre>
==== <code><big>MIN (<list of: numeric expression>)</big></code> ====
''BASIC 1.0 & 1.1''
: '''FUNCTION''': Returns the MINimum value from the <list of: numeric expression>s.
'''Associated keywords''': MAX
==== : '''Example''':<codepre>PRINT MIN (list of n3,6,2.999.8,9,) 2.999</codepre> ==== : Returns the minimum value from the given list (see MAX) 
==== <code>PEEK (add)</code> ====
205
edits