Southampton BASIC System: Difference between revisions

Content deleted Content added
Citation bot (talk | contribs)
m Alter: template type. Add: pages, issue, volume, journal. Removed parameters. Formatted dashes. Some additions/deletions were actually parameter name changes. | You can use this bot yourself. Report bugs here. | Activated by User:AManWithNoPlan | All pages linked from User:AManWithNoPlan/sandbox2 | via #UCB_webform_linked
m Task 70: Update syntaxhighlight tags - remove use of deprecated <source> tags
Line 123:
 
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
<sourcesyntaxhighlight lang="basic">
10 LET A£ = "FOO"
20 PRINT A£[2,3]
</syntaxhighlight>
</source>
would print <code>OO</code>
 
This syntax was also supported on the left-hand side of an assignment, so
<sourcesyntaxhighlight lang="basic">
10 LET A£ = "FOO"
20 LET A£[2,2] = "BAR"
30 PRINT A£
</syntaxhighlight>
</source>
would print <code>FBARO</code>
 
Line 141:
 
Example:
<sourcesyntaxhighlight lang="basic">
10 DIM A(3,3)
20 MAT READ A
Line 152:
90 MAT D=INV(C)
100 MAT PRINT D,
</syntaxhighlight>
</source>
{|
|<code>A</code> is read from the first <code>DATA</code> statement