Southampton BASIC System: Difference between revisions

Content deleted Content added
Disambiguated: SOBSOB (disambiguation)
m Language characteristics: <source lang="basic">
Line 116:
 
Support for strings was more limited, with only one function, <code>LEN</code>, which returned the length of the string parameter. Sub-strings were supported with square brackets, so <code>A£[2,3]</code> referred to the sub-string of the string <code>A£</code> from the 2nd character to the 3rd character inclusive, so
<source lang="basic">
10 LET A£ = "FOO"
20 PRINT A£[2,3]
</source>
would print <code>OO</code>
 
This syntax was also supported on the left-hand side of an assignment, so
<source lang="basic">
10 LET A£ = "FOO"
20 LET A£[2,2] = "BAR"
30 PRINT A£
</source>
would print <code>FBARO</code>
 
Line 130 ⟶ 134:
 
Example:
<source lang="basic">
10 DIM A(3,3)
20 MAT READ A
Line 140 ⟶ 145:
90 MAT D=INV(C)
100 MAT PRINT D,
</source>
 
{|
|<code>A</code> is read from the first <code>DATA</code> statement