Overview
ISO 8651-1:1988 specifies the FORTRAN language binding for the Graphical Kernel System (GKS), enabling the language‑independent GKS (functional description in ISO 7942) to be embedded in ISO FORTRAN 77 (ISO 1539) programs. The standard defines naming conventions, parameter mapping, data types, error handling and special rules for the FORTRAN 77 subset. Annex A provides FORTRAN examples and Annex B lists Metafile Item Types.
Key topics and requirements
- Language binding scope: Clauses 3–9 describe the FORTRAN binding interface for GKS; the binding maps GKS functions to FORTRAN subroutines following FORTRAN 77 conventions.
- Subroutine naming convention: All GKS functions map to FORTRAN subroutine names that start with G. Abbreviations are derived using standardized reduction rules (plurals, compound terms, deletions). Example: ACTIVATE WORKSTATION → GACWK.
- Inquiry functions and list handling: Inquiry functions that return lists (sets) return a single element per call plus the total number of elements. Elements are 1‑based indexed; when the set is empty the total is zero and the element value is undefined.
- FORTRAN 77 subset support: The binding provides alternate definitions to accommodate the FORTRAN 77 Subset, e.g., replacing CHARACTER*() with **CHARACTER80** plus length integers; some subroutine names differ (a final “S” may distinguish subset versions).
- Data type mapping: GKS types map to FORTRAN types - integer → INTEGER, real → REAL, string → CHARACTER (with rules for length and length parameters). Points are represented by two REALs (X and Y). Enumerations are mapped to INTEGER in the range 0..N‑1 (null value is position 0).
- Error handling: Two standard routines-GERLOG (logging) and GERHND (handler). Applications may replace GERHND with a user routine that can still call GERLOG.
- Additional materials: Annex A (FORTRAN examples) and Annex B (Metafile Item Types) support implementation and interoperability.
Practical applications
- Implementing GKS libraries or language bindings for FORTRAN 77
- Porting/maintaining legacy scientific visualization, CAD, or engineering graphics applications written in FORTRAN
- Building interoperable graphics drivers that use GKS metafiles
- Ensuring consistent naming, parameter and data type behavior across FORTRAN GKS implementations
Who should use this standard
- Graphics library developers and vendors implementing GKS for FORTRAN
- Software engineers maintaining legacy FORTRAN graphical applications
- Standards and interoperability engineers working with GKS metafiles and cross‑platform graphical interfaces
Related standards
- ISO 7942 - GKS functional description (language independent)
- ISO 1539 - FORTRAN (programming language)