SDS BASIC, also known as CP-V BASIC, Batch BASIC or Sigma BASIC depending on the version, is a BASIC programming language compiler for Scientific Data Systems's (SDS) Sigma series mainframe computers, originally released in 1967. Xerox purchased SDS in 1969 and began rebranding it as Xerox Data Systems, and finally just Xerox, at which time the language became known as Xerox BASIC. The original versions did not include support for string variables, although this was added for the version running under the CP-V operating system when it was released in 1971. The string library allowed manipulation of strings using array slicing syntax, similar to the system found in HP Time-Shared BASIC and a number of microcomputer BASICs like Integer BASIC and Atari BASIC. This style of string manipulation differs from the model introduced in DEC's BASIC-PLUS, which used string functions. Altair BASIC was patterned on BASIC-PLUS, and this style became the de facto standard after the cross-platform version, Microsoft BASIC, became almost universal during the home computer era. This makes conversion from SDS to modern dialects somewhat difficult. SDS BASIC is historically notable as the platform on which the original Star Trek computer game was written in the summer of 1971. Syntax In keeping with the original Dartmouth BASIC model, and in common with most mainframe-based BASICs, SDS BASIC was a compiler, not an interpreter, and used separate but tightly integrated tools for editing and running. The editor was dedicated to BASIC; as lines are entered they are analyzed for correct syntax and then stored in tokenized form. If a line is entered with a number at the start, it is placed into the appropriate location in the program based on the number, lines without numbers were immediately processed and then forgotten. SDS allowed line numbers in the range 1 to 99999. A simple example is: 10 PRINT "HELLO WORLD" Like many versions of BASIC, SDS allowed a single line of code to contain multiple statements. In most dialects this is indicated using the colon, but SDS used either the backslash, or ampersand, . An equivalent line in SDS would be: 10 PRINT "HELLO" \ PRINT "WORLD" Because SDS was a compiler, and the user's source code was stored separately, it preserved leading spaces in the code. They suggested using this to more clearly indicate the structure of loops: 10 LET J=0, K=1 20 FOR I=K TO 8 30 PRINT