Category:S-BASIC: Difference between revisions

From Rosetta Code
Content added Content deleted
m (Tigerofdarkness moved page Category:S BASIC to Category:S-BASIC: Correct language name so it matches most of the samples)
mNo edit summary
 
Line 10: Line 10:
implementation that preserved BASIC's ease of use and
implementation that preserved BASIC's ease of use and
straight-forward syntax, while incorporating the syntactic and
straight-forward syntax, while incorporating the syntactic and
control-flow features associated with modern programming languages.
control-flow features associated with modern programming languages,
including local variables, recursion, statement grouping with
BEGIN and END, looping with WHILE and REPEAT statements,
multi-way decisions with a CASE statement, and named functions
and procedures. S-BASIC also incorporates a number of
miscellaneous useful features: COMMENT and TEXT statements that
eliminate the need for multiple REM or PRINT statements, a FIXED
(binary coded decimal) variable type for financial calculations,
BASED variables that may be positioned at run-time, and a
powerful $INCLUDE command that allows functions and procedures to
be gathered into library files and selectively extracted at
compile time. Line numbers were not required unless the line was the target of a GOTO or GOSUB statement and were in any event treated simply as labels. All parameters to functions and procedures were passed by value; arrays, unfortunately, could not be passed as parameters.

Latest revision as of 14:21, 29 October 2021

This page is a stub. It needs more information! You can help Rosetta Code by filling it in!
Language
S-BASIC
This programming language may be used to instruct a computer to perform a task.
See Also:


Listed below are all of the tasks on Rosetta Code which have been solved using S-BASIC.

S-BASIC (the S stands for "structured") was a native-code compiler for an ALGOL-like dialect of the BASIC programming language, and ran on 8-bit microcomputers using the Z80 CPU and the CP/M operating system. (There are a number of CP/M or Z80 emulators that will allow the compiler to run on Windows or Linux systems today.) The language and the compiler were developed during the period 1979-1981 by Gilbert Ohnysty, who saw a need for a true native-code compiler and a language implementation that preserved BASIC's ease of use and straight-forward syntax, while incorporating the syntactic and control-flow features associated with modern programming languages, including local variables, recursion, statement grouping with BEGIN and END, looping with WHILE and REPEAT statements, multi-way decisions with a CASE statement, and named functions and procedures. S-BASIC also incorporates a number of miscellaneous useful features: COMMENT and TEXT statements that eliminate the need for multiple REM or PRINT statements, a FIXED (binary coded decimal) variable type for financial calculations, BASED variables that may be positioned at run-time, and a powerful $INCLUDE command that allows functions and procedures to be gathered into library files and selectively extracted at compile time. Line numbers were not required unless the line was the target of a GOTO or GOSUB statement and were in any event treated simply as labels. All parameters to functions and procedures were passed by value; arrays, unfortunately, could not be passed as parameters.