Content deleted Content added
m Subst away date template (up to three passes) using Project:AWB |
m Open access bot: url-access updated in citation with #oabot. |
||
(28 intermediate revisions by 21 users not shown) | |||
Line 1:
{{One source|date=December 2023}}
{{see also|SOB (disambiguation)}}
'''Southampton BASIC System''' (SOBS} was a dialect of the [[BASIC]] programming language developed for and used on [[ICT 1900]] series computers in the late 60s and early 70s; it was implemented under the [[MINIMOP]] operating system at the [[University of Southampton]].<xyzzyxyzy>▼
{{Use dmy dates|date=August 2021}}
{{cite web▼
▲'''Southampton BASIC System''' ('''SOBS
| last = Rees▼
| first = M.J.▼
| last2 = Oppenheimer
| first2 = A.W.
| title = SOBS
|
| publisher = Wiley InterScience
| date = 21 January 1977
| volume = 7
| url = http://www3.interscience.wiley.com/journal/113444749/abstract?CRETRY=1&SRETRY=0▼
| issue = 5
| pages = 631–643
| archive-url = https://archive.today/20130105083634/http://www3.interscience.wiley.com/journal/113444749/abstract?CRETRY=1&SRETRY=0
| url-status = dead
| archive-date = 5 January 2013
| format =
| doi = 10.1002/spe.4380070508
|
| access-date = 18 May 2009
| url-access = subscription
}}</ref> and also ran under [[MAXIMOP]].
It was operated from a [[
== Language characteristics ==
Line 61 ⟶ 71:
|-
| <code>PRINT</code>
| Output to the
|-
| <code>READ ''var''...</code>
Line 78 ⟶ 88:
=== Variables ===
[[Variable (programming)|Variable]] names for numeric values were either a single letter, or a single letter followed by a single numeric digit, thus allowing for 286 discreet variables in total. Strings were supported; variable names for them had the same restriction but were followed by a pound (<code>
=== Functions ===
Line 115 ⟶ 125:
|}
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>
<syntaxhighlight lang="basic">
10 LET A£ = "FOO"▼
</syntaxhighlight>
would print <code>OO</code>
This syntax was also supported on the left-hand side of an assignment, so
<syntaxhighlight lang="basic">
▲ 30 PRINT A£
30 PRINT A£
</syntaxhighlight>
would print <code>FBARO</code>
Line 130 ⟶ 144:
Example:
<syntaxhighlight lang="basic">
100 MAT PRINT D,
</syntaxhighlight>
{|
|<code>A</code> is read from the first <code>DATA</code> statement
|<math>\begin{pmatrix}
\end{pmatrix}</math>
|-
|<code>B</code> is read from the second <code>DATA</code> statement
|<math>\begin{pmatrix}
\end{pmatrix}</math>
|-
|<code>C</code> is calculated by multiplying <code>A</code> and <code>B</code>
|<math>\begin{pmatrix}
\end{pmatrix}</math>
|-
|<code>D</code> is calculated as the inverse of <code>C</code>
|<math>\begin{pmatrix}
\end{pmatrix}</math>
|}
The output would be
== Debugging ==
{{expand
SOBS had primitive debugging capabilities, limited mostly to the <code>TRACE</code> statement. <code>TRACE ON</code> would cause the interpreter to print each line number as it was executed.
Line 183 ⟶ 198:
{{Reflist}}
{{BASIC}}
[[Category:BASIC programming language family]]▼
{{DEFAULTSORT:Southampton Basic System}}
[[Category:BASIC interpreters]]
[[Category:ICL programming languages]]
[[Category:Science and technology in Hampshire]]
[[Category:University of Southampton]]
▲[[Category:BASIC programming language family]]
|