SOBS
   HOME

TheInfoList



OR:

Southampton BASIC System (SOBS) was a dialect of the
BASIC Basic or BASIC may refer to: Science and technology * BASIC, a computer programming language * Basic (chemistry), having the properties of a base * Basic access authentication, in HTTP Entertainment * Basic (film), ''Basic'' (film), a 2003 film ...
programming language A programming language is a system of notation for writing computer programs. Programming languages are described in terms of their Syntax (programming languages), syntax (form) and semantics (computer science), semantics (meaning), usually def ...
developed for and used on
ICT 1900 series ICT 1900 was a family of mainframe computers released by International Computers and Tabulators (ICT) and later International Computers Limited (ICL) during the 1960s and 1970s. The 1900 series was notable for being one of the few non-America ...
computers in the late 1960s and early 1970s; it was implemented as an incremental
BASIC interpreter A BASIC interpreter is an Interpreter (computing), interpreter that enables users to enter and run programs in the BASIC programming language, language and was, for the first part of the microcomputer era, the default Application software, applica ...
under the
MINIMOP MINIMOP was an operating system which ran on the International Computers Limited (ICL) 1900 series of computers. MINIMOP provided an on-line, time-sharing In computing, time-sharing is the Concurrency (computer science), concurrent sharing o ...
operating system at the
University of Southampton The University of Southampton (abbreviated as ''Soton'' in post-nominal letters) is a public university, public research university in Southampton, England. Southampton is a founding member of the Russell Group of research-intensive universit ...
and also ran under MAXIMOP. It was operated from a
Teletype A teleprinter (teletypewriter, teletype or TTY) is an electromechanical device that can be used to send and receive typed messages through various communications channels, in both point-to-point and point-to-multipoint configurations. Init ...
terminal, though CRT terminals could also be used.


Language characteristics

In common with many early implementations of BASIC, SOBS needed lines to have
line number In computing, a line number is a method used to specify a particular sequence of characters in a text file. The most common method of assigning numbers to lines is to assign every line a unique number, starting at 1 for the first line, and increm ...
s, both to allow a user to add new lines to the program in the desired place and also as targets for GOTO and GOSUB statements. A RENUMBER facility was available to allow for sections of the code to be renumbered, by default in increments of 10, to allow more space in the middle of a program. Other than line numbers, all numeric values were represented internally as
floating point In computing, floating-point arithmetic (FP) is arithmetic on subsets of real numbers formed by a ''significand'' (a signed sequence of a fixed number of digits in some base) multiplied by an integer power of that base. Numbers of this form ...
.


Statements

The language had relatively few statements by comparison with modern programming languages: Note in particular the lack of a WHILE-like statement; FOR was the only looping construct available to programmers.


Variables

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 (£) symbol.


Functions

A limited number of numeric functions were provided, all of which took one numeric parameter: Support for strings was more limited, with only one function, LEN, which returned the length of the string parameter. Sub-strings were supported with square brackets, so ,3/code> referred to the sub-string of the string from the 2nd character to the 3rd character inclusive, so 10 LET A£ = "FOO" 20 PRINT A£ ,3 would print OO This syntax was also supported on the left-hand side of an assignment, so 10 LET A£ = "FOO" 20 LET A£ ,2= "BAR" 30 PRINT A£ would print FBARO


Arrays

Support for handling arrays of data was relatively strong, with MAT statements able to read an entire array from DATA statements, and perform useful
matrix Matrix (: matrices or matrixes) or MATRIX may refer to: Science and mathematics * Matrix (mathematics), a rectangular array of numbers, symbols or expressions * Matrix (logic), part of a formula in prenex normal form * Matrix (biology), the m ...
operations such as
matrix addition In mathematics, matrix addition is the operation of adding two matrices by adding the corresponding entries together. For a vector, \vec\!, adding two matrices would have the geometric effect of applying each matrix transformation separately ...
,
matrix subtraction In mathematics, matrix addition is the operation of adding two matrices by adding the corresponding entries together. For a vector, \vec\!, adding two matrices would have the geometric effect of applying each matrix transformation separately on ...
,
matrix multiplication In mathematics, specifically in linear algebra, matrix multiplication is a binary operation that produces a matrix (mathematics), matrix from two matrices. For matrix multiplication, the number of columns in the first matrix must be equal to the n ...
, and finding the
inverse matrix In linear algebra, an invertible matrix (''non-singular'', ''non-degenarate'' or ''regular'') is a square matrix that has an inverse. In other words, if some other matrix is multiplied by the invertible matrix, the result can be multiplied by an ...
for a
square matrix In mathematics, a square matrix is a Matrix (mathematics), matrix with the same number of rows and columns. An ''n''-by-''n'' matrix is known as a square matrix of order Any two square matrices of the same order can be added and multiplied. Squ ...
. Example: 10 DIM A(3,3) 20 MAT READ A 30 DATA 1,1,2,1,0,2,0,2,1 40 DIM B(3,3) 50 MAT READ B 60 DATA 0,0,1,0,1,0,1,0,0 70 DIM C(3,3),D(3,3) 80 MAT C=A*B 90 MAT D=INV(C) 100 MAT PRINT D, The output would be 2 2 1 1 -1 0 4 -3 -2


Debugging

SOBS had primitive debugging capabilities, limited mostly to the TRACE statement. TRACE ON would cause the interpreter to print each line number as it was executed.


References

{{DEFAULTSORT:Southampton Basic System BASIC interpreters ICL programming languages Science and technology in Hampshire University of Southampton BASIC programming language family