IEC 15475-1:2004 (ISO/IEC 15475-1:2004) — Information Technology — Programming Languages — Full BASIC

A comprehensive technical guide to the syntax, semantics, and compliance requirements of the standardized Full BASIC language.

Scope and Introduction

IEC 15475-1:2004, which is identical to ISO/IEC 15475-1:2004, defines the syntax, semantics, and run-time behavior of the Full BASIC programming language. This standard is part of a multi-part series that covers the core language (Part 1), modules (Part 2), and additional features (subsequent parts). It supersedes the earlier standard ISO/IEC 10279:1991 and provides a rich, structured, and extensible language suitable for education, rapid prototyping, and application development.

The standard specifies the full feature set of BASIC, including control structures, data types, file handling, graphical output, and exception handling. It aims to ensure portability and interoperability across implementations while preserving the simplicity that made BASIC widely adopted.

Purpose: The primary goal of IEC 15475-1 is to establish a common, unambiguous specification for Full BASIC that enables developers to write programs that run identically on any conforming implementation.

Technical Requirements and Language Specification

Data Types and Structures

The standard mandates support for numeric (real and complex), string, and logical data types. It also defines structured data types such as arrays (with dynamic bounds) and records (via the TYPE construct). Table 1 summarises the core data types and their attributes.

TypeClassificationDefault PrecisionRange (Minimum)
REALNumeric10 decimal digits1.0E-38 to 1.0E+38
COMPLEXNumeric10+10 digitsReal and imaginary as above
STRINGCharacter1 character0 to 231–1 length
LOGICALBooleanTRUE / FALSE
Note: Implementations may extend the precision (e.g., using double-precision floating point) but must not reduce the required minimum range.

Control Structures and Subprograms

Full BASIC supports structured programming constructs: IFTHENELSE, SELECT CASE, FORNEXT, DOLOOP (with WHILE/UNTIL), and EXIT for loop termination. Subprograms are defined using EXTERNAL SUB and FUNCTION constructs, with formal parameters passed by reference by default. Recursion is explicitly permitted.

Important: All subprograms must be declared as EXTERNAL unless they are internal to a module. The standard does not allow nested subprogram definitions except via modules (Part 2).

Implementation Highlights

Input/Output and File Handling

The standard defines a comprehensive I/O model based on channels (numeric identifiers). Files can be sequential or direct-access, formatted or unformatted. The OPEN, READ, WRITE, and CLOSE statements conform to a consistent syntax. Graphical output is supported via the PLOT and DRAW statements, with transformations (scaling, rotation).

Error Handling and Exception Management

The standard includes a robust exception-handling mechanism using WHENUSE blocks. It defines a set of mandatory exception conditions (e.g., division by zero, subscript out of range, file not found) and permits user-defined exceptions. The EXAMINE statement allows runtime interrogation of exception status.

Implementation Note: Conforming implementations must raise exactly the exceptions specified in the standard for given error conditions. Allowing non‑standard extensions is permitted, provided they do not interfere with the required semantics.

Compliance Notes and Certification

An implementation claiming compliance with IEC 15475-1:2004 must satisfy all mandatory requirements indicated by the verb “shall”. The standard distinguishes between:

  • Mandatory features — must be present and behave exactly as specified.
  • Optional features — if implemented, must adhere to the normative description.
  • Implementation‑defined features — the implementation may choose a behavior, but must document it clearly.

To claim “Full BASIC” conformance, an implementation must pass a validation suite (e.g., the one available from ISO/IEC JTC 1/SC 22). The standard does not define a formal certification body, but self-certification with documented test results is common.

Caution: Many legacy BASIC dialects deviate substantially from this standard. Migrating code to IEC 15475-1 requires careful adaptation of file I/O, error handling, and graphical constructs.
Tip: For developers, using only the constructs defined in IEC 15475-1 ensures maximum portability. For compiler or interpreter developers, consulting the formal semantics (given in VDM or a similar notation) is essential to avoid ambiguous behavior.

Frequently Asked Questions

Q: Is IEC 15475-1:2004 the same as ISO/IEC 15475-1:2004?
A: Yes. IEC 15475-1:2004 is the identical adoption of the ISO/IEC standard by the International Electrotechnical Commission. The Canadian adoption (CAN/CSA-ISO/IEC 15475-1-04) also maintains technical equivalence. All three documents share the same normative content.
Q: What is the relationship between Part 1 and Part 2 (ISO/IEC 15475-2)?
A: Part 1 defines the core Full BASIC language. Part 2 introduces a module system that allows separate compilation and encapsulation. Part 1 alone is sufficient for standalone programs; Part 2 adds modularity features and is an extension of Part 1.
Q: Does the standard require an interactive environment?
A: No. The standard defines the language semantics and I/O behavior, but does not mandate a specific implementation model (compiled, interpreted, or interactive). However, many implementations provide interactive modes to honor historical usage.
Q: Can I use this standard for new projects?
A: Absolutely. Full BASIC remains a capable language for teaching programming, writing small‑to‑medium applications, and embedding scripting. Its clarity and readability make it a solid choice for maintaining legacy systems and educational tools.

© 2026 — This technical article is prepared for informational purposes. Always refer to the official standard text for authoritative requirements.

📥 Standard Documents Download

🔒
Please wait 10 seconds, the download links will appear after the ad loads

Leave a Reply

Your email address will not be published. Required fields are marked *