Standard ECMA-55 - Minimal BASIC

Electronic version of the scanned original

ECMA-55.pdf View on GitHub

Appendix 1

Organization of the Standard

This Standard is organized into a number of sections, each of which covers a particular feature of BASIC. Sections 4 to 20 are divided into sub-sections, as follows.

Sub-section 1. General Description

This sub-section briefly describes the features of BASIC to be treated and indicates the general syntactic form of these features.

Sub-section 2. Syntax

The exact syntax of features of the language is described in a modified context-free grammar or Backus-Naur Form. The details of this method of syntax specification are described in Appendix 2.

In order to keep the syntax reasonably simple the syntax specification will allow it to describe some constructions which, strictly speaking, are not legal according to this Standard, e.g. it will allow the generation of the statement

100 LET X = A( 1) + A( 1,2 )

in which the array A occurs with differing numbers of subscripts, Rather than ruling such constructions out by a more complicated syntax, this Standard shall instead rule them out in the semantics.

Sub-section 3. Examples

A short list of valid examples that can be generated by certain of the syntax equations in sub-section 2 is given.

Sub-section 4. Semantics

The semantic rules in this Standard serve two purposes. First, they rule out certain constructions which are permitted by the syntax, but which have no valid meaning according to this Standard. Second, they assign a meaning to the remaining constructions.

Sub-section 5. Exceptions

An exception occurs when an implementation recognizes that a program may not perform or is not performing in accordance with this Standard. All exceptions described in this section shall be reported unless some mechanism is provided in an enhancement to this Standard that has been invoked by the user to handle exceptions.

Where indicated, certain exceptions may be handled by the specified procedures; if no procedure is given, or if restrictions imposed by the hardware or the operating environment make it impossible to follow the given procedures, then the exception must be handled by terminating the program. Enhancements to this Standard may describe mechanisms for controlling the manner in which exceptions are reported and handled, but no such mechanisms are specified in this Standard.

This Standard does not specify an order in which exceptions shall be detected or processed.

Sub-section 6. Remarks

This sub-section contains remarks which point out certain features of this Standard as well as remarks which make recommendations concerning the implementation of a BASIC language processor in an operating environment.

Back