Southampton BASIC System: Difference between revisions

Content deleted Content added
m Task 70: Update syntaxhighlight tags - remove use of deprecated <source> tags
m Functions: line number
Line 124:
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
<syntaxhighlight lang="basic">
10 LET A£ = "FOO"
20 PRINT A£[2,3]
</syntaxhighlight>
would print <code>OO</code>
Line 131:
This syntax was also supported on the left-hand side of an assignment, so
<syntaxhighlight lang="basic">
10 LET A£ = "FOO"
20 LET A£[2,2] = "BAR"
30 PRINT A£
</syntaxhighlight>
would print <code>FBARO</code>