ISO 7185:1990 情報技術—プログラミング言語— Pascal | ページ 2

※一部、英文及び仏文を自動翻訳した日本語訳を使用しています。

序文

ISO (国際標準化機構) と IEC (国際電気標準会議) は、世界標準化のための専門システムを形成しています。 ISO または IEC のメンバーである国家機関は、技術活動の特定の分野を扱うために、それぞれの組織によって設立された技術委員会を通じて、国際規格の開発に参加しています。 ISO と IEC の技術委員会は、相互に関心のある分野で協力しています。 ISO および IEC と連携して、政府および非政府の他の国際機関もこの作業に参加しています。

情報技術の分野では、ISO と IEC は合同技術委員会 ISO/IEC JTC 1 を設立しました。合同技術委員会によって採択された国際規格の草案は、投票のために各国の機関に回覧されます。国際規格として発行するには、投票を行う国の機関の少なくとも 75% による承認が必要です。

国際規格 ISO/IEC 7185 は、合同技術委員会 ISO/IEC JTC 1, 情報技術によって作成されました。

この第 2 版は、第 1 版 (ISO 7185:1983) を取り消して置き換えるものです。

附属書 A, B, C, D, E, および F は参考情報です。

序章

この国際標準は、プログラミング言語 Pascal の明確でマシンに依存しない定義を提供します。その目的は、さまざまなデータ処理システムで使用するための Pascal プログラムの移植性を促進することです。

言語史

コンピューター プログラミング言語 Pascal は、ニクラウス ヴィルト教授によって 2 つの主な目的を満たすように設計されました。

  • a)言語によって明確かつ自然に反映される特定の基本概念に基づく体系的な分野として、プログラミングを教えるのに適した言語を利用できるようにすること。
  • b)その時点で利用可能なコンピューター上で信頼性が高く効率的な実装が可能な言語を定義すること。

しかし、パスカルにはこれらの当初の目標をはるかに超える属性があることが明らかになりました。現在、システム ソフトウェアとアプリケーション ソフトウェアの両方を作成する際に商業的に使用されることが増えています。この国際標準は、主に、Pascal に対する商業的関心の高まりと、データ処理システム間での Pascal プログラムの移植性を促進する必要性の結果です。

この国際規格の起草において、Pascal の継続的な安定性が主要な目的でした。ただし、仕様を明確にするための変更とは別に、2 つの大きな変更が導入されています。

  • a)手続き型および関数型のパラメータを指定するために使用される構文は、必要に応じて手続きまたは関数の見出しの使用を要求するように変更されました (6.6.3.1 を参照)この変更は、言語の不安を克服するために導入されました。
  • b) 5 番目の種類のパラメータ、conformant-array-parameter が導入されました (6.6.3.7 を参照)この種のパラメータでは、実パラメータのインデックス タイプの必要な境界は固定されていませんが、指定された値の範囲に制限されています。

プロジェクトの歴史

1977 年に、プログラミング言語 Pascal の標準を作成するために、英国規格協会 (BSI) 内にワーキング グループが結成されました。このグループはいくつかの作業草案を作成し、パブリック コメントのための最初の草案は 1979 年初頭に広く公開されました。 SC5/WG4) は 1979 年に設立されました。Pascal 規格は、ISO に代わって BSI によって発行されることになっており、この英国規格は国際規格によって参照されています。

米国では、1978 年の秋に、IEEE Computer Society がプロジェクト 770 (Pascal) を承認するために、IEEE Standards Board に申請を行いました。承認後、最初の会議は 1979 年 1 月に開催されました。

1978 年 12 月、X3J9 は SPARC (Standards Planning and Requirements Committee) の決議の結果として、英国が開始した ISO Pascal 標準化の取り組みのために US TAG (Technical Advisory Group) を形成することに同意しました。これらの取り組みは、X3 プロジェクト 317 の下で行われました。

1979 年 2 月、THEE 代表者の同意を得て、X3 決議により、X3J9 委員会と P770 委員会が合同 X3J9/IEEE-P770 パスカル標準委員会と呼ばれる単一の委員会に統合されました。 (以下、JPC という用語はこの委員会を指す。)JPC としての最初の会議は 1979 年 4 月に開催された。

JPC を設立するという決議は、dpANS と提案された IEEE Pascal 標準を作成する単一の合同委員会の二重の機能を明確にし、内容は同じでした。

ANSI/IEEE770X3.97-1983, アメリカ国家標準パスカル コンピューター プログラミング言語は、1981 年 9 月 17 日に IEEE 標準化委員会によって承認され、アメリカ国家標準によって承認されました。

1982 年 12 月 16 日に制定されました。英国規格 BS6192, コンピュータ プログラミング言語 Pascal の仕様は 1982 年に発行され、国際規格 7185 (参照により BS6192 を組み込む) は 1983 年 12 月 1 日に ISO によって承認されました。 ANSI 規格と ISO 規格の違いANSI/IEEE770X3.97-1983 の序文に詳述されています。

1985 年、ISO Pascal 作業部会 (当時は ISO/TC97/SC22/WG2, 現在は ISO/IEC JTC1/SC22/WG2 と呼ばれていた) が長い休止の後に再召集されました。 Pascal 規格の疑わしい部分やあいまいな部分を解釈するために、解釈サブグループが形成されました。このサブグループの作業、および WG2 と JPC によって作成された拡張パスカル標準に関する作業の結果として、BS6192/IS07185 は 1988/89 年に改訂および修正されました。 ANSI/IEEE770X3.97-1983 は改訂された ISO 7185 に置き換えられることが予想されます。

新しい ISO 7185 を作成するための BS6192:1982 の主な改訂は次のとおりです。

  • a) ANSI/IEEE770X3.97-1983 との違いの解決;
  • b)実数の構文を緩和し、さまざまなコンポーネントに「符号なし整数」ではなく「数字列」を許可する。
  • c)テキストファイルの「行末文字」の処理。
  • d)実行時エラーの処理。

1 スコープ

1.1この国際標準は、プロセッサと適合プログラムの要件を指定することにより、コンピューター プログラミング言語 Pascal のセマンティクスと構文を指定します。プロセッサとプログラムの両方に対して、2 つのレベルの準拠が定義されています。

1.2この国際規格は指定しない

  • a)特定のデータ処理システムの容量または特定のプロセッサの容量を超えるプログラムおよびそのデータのサイズまたは複雑さ、または対応する制限を超えた場合に取られるアクション。
  • b) Pascal 用プロセッサの実装をサポートできるデータ処理システムの最小要件。
  • c) Pascal プログラムが変換され実行される環境を制御するために使用されるプログラム ブロックまたはコマンド セットをアクティブ化する方法。
  • d) Pascal で書かれたプログラムをデータ処理システムで使用するために変換するメカニズム。
  • e)エラーまたは警告を報告する方法。
  • f)人間が読むために発行されたプログラムの印刷表現。

2 規範的参照

次の規格には、このテキストで参照することにより、この国際規格の規定を構成する規定が含まれています。発行時点では、示されたエディションが有効でした。すべての規格は改訂される可能性があり、この国際規格に基づく契約の当事者は、以下にリストされている規格の最新版を適用する可能性を調査することをお勧めします。 IEC および ISO のメンバーは、現在有効な国際規格の登録簿を維持しています。

  • ISO 646:1983, 情報処理 — 情報交換用の ISO 7 ビット コード化文字セット。

3 つの定義

この国際規格の目的のために、次の定義が適用されます。

注 -言語の概念に注意を引くために、一部の用語は、この規格で最初に言及された箇所または定義された箇所でイタリック体で印刷されています。

3.1 エラー

プロセッサが検出されないままにしておくことが許可されている、この国際規格の要件に対するプログラムによる違反。

ノート

  • 1この国際規格の違反または非違反が、プログラムによって読み取られるデータまたは実装定義機能の実装定義の知識を必要とするプログラムを構築することが可能である場合、その要件の違反はエラーとして分類されます。 .プロセッサは、そのような知識がなくても要件違反を報告することがありますが、必要な知識を持った実行、シミュレートされた実行、または証明手順が必要な場合が常に残ります。そのような知識がなくても検証できる要件は、エラーとして分類されません。
  • 2プロセッサは、可能な限り多くのエラーを検出し、可能な限り完全に検出する必要があります。検出が過度の負担になる実装では、検出を省略する許可が与えられます。

3.2 拡張機能

5.2 で定義されているように、この国際規格に準拠するプログラムを無効にしない、この国際規格の要件の第 6 節の修正。 3)

3.3 実装の定義

プロセッサによって異なる可能性がありますが、特定のプロセッサに対して定義されています。

3.4 実装依存

プロセッサ間で異なる可能性があり、必ずしも特定のプロセッサに対して定義されているわけではありません。

3.5 プロセッサー

プログラムを入力として受け入れ、実行の準備を行い、データを使用して定義されたプロセスを実行して結果を生成するシステムまたはメカニズム。

注 —プロセッサは、インタプリタ、コンパイラおよびランタイム システム、または別のメカニズムと、関連するホスト コンピューティング マシンおよびオペレーティング システム、または同じ効果を達成するための別のメカニズムで構成されている場合があります。たとえば、コンパイラ自体はプロセッサを構成しません。

Foreword

ISO (the International Organization for Standardization) and IEC (the International Electrotechnical Commission) form the specialized system for worldwide standardization. National bodies that are members of ISO or IEC participate in the development of International Standards through technical committees established by the respective organization to deal with particular fields of technical activity. ISO and IEC technical committees collaborate in fields of mutual interest. Other international organizations, governmental and non-governmental, in liaison with ISO and IEC, also take part in the work.

In the field of information technology, ISO and IEC have established a joint technical committee, ISO/IEC JTC 1. Draft International Standards adopted by the joint technical committee are circulated to national bodies for voting. Publication as an International Standard requires approval by at least 75 % of the national bodies casting a vote.

International Standard ISO/IEC 7185 was prepared by Joint Technical Committee ISO/IEC JTC 1, Information technology.

This second edition cancels and replaces the first edition (ISO 7185: 1983).

Annexes A, B, C, D, E and F are for information.

Introduction

This International Standard provides an unambiguous and machine independent definition of the programming language Pascal. Its purpose is to facilitate portability of Pascal programs for use on a wide variety of data processing systems.

Language history

The computer programming language Pascal was designed by Professor Niklaus Wirth to satisfy two principal aims

  • a) to make available a language suitable for teaching programming as a systematic discipline based on certain fundamental concepts clearly and naturally reflected by the language;
  • b) to define a language whose implementations could be both reliable and efficient on then-available computers.

However, it has become apparent that Pascal has attributes that go far beyond these original goals. It is now being increasingly used commercially in the writing of both system and application software. This International Standard is primarily a consequence of the growing commercial interest in Pascal and the need to promote the portability of Pascal programs between data processing systems.

In drafting this International Standard the continued stability of Pascal has been a prime objective. However, apart from changes to clarify the specification, two major changes have been introduced.

  • a) The syntax used to specify procedural and functional parameters has been changed to require the use of a procedure or function heading, as appropriate (see 6.6.3.1); this change was introduced to overcome a language insecurity.
  • b) A fifth kind of parameter, the conformant-array-parameter, has been introduced (see 6.6.3.7). With this kind of parameter, the required bounds of the index-type of an actual-parameter are not fixed, but are restricted to a specified range of values.

Project history

In 1977, a working group was formed within the British Standards Institution (BSI) to produce a standard for the programming language Pascal. This group produced several working drafts, the first draft for public comment being widely published early in 1979. In 1978, BSI’s proposal that Pascal be added to ISO’s program of work was accepted, and the ISO Pascal Working Group (then designated ISO/TC97/SC5/WG4) was formed in 1979. The Pascal standard was to be published by BSI on behalf of ISO, and this British Standard referenced by the International Standard.

In the USA, in the fall of 1978, application was made to the IEEE Standards Board by the IEEE Computer Society to authorize project 770 (Pascal). After approval, the first meeting was held in January 1979.

In December of 1978, X3J9 convened as a result of a SPARC (Standards Planning and Requirements Committee) resolution to form a US TAG (Technical Advisory Group) for the ISO Pascal standardization effort initiated by the UK. These efforts were performed under X3 project 317.

In agreement with THEE representatives, in February of 1979, an X3 resolution combined the X3J9 and P770 committees into a single committee called the Joint X3J9/IEEE-P770 Pascal Standards Committee. (Throughout, the term JPC refers to this committee.) The first meeting as JPC was held in April 1979.

The resolution to form JPC clarified the dual function of the single joint committee to produce a dpANS and a proposed IEEE Pascal standard, identical in content.

ANSI/IEEE770X3.97-1983, American National Standard Pascal Computer Programming Language, was approved by the IEEE Standards Board on September 17, 1981, and by the American National Standards

Institute on December 16, 1982. British Standard BS6192, Specification for Computer programming language Pascal, was published in 1982, and International Standard 7185 (incorporating BS6192 by reference) was approved by ISO on December 1, 1983. Differences between the ANSI and ISO standards are detailed in the Foreword of ANSI/IEEE770X3.97-1983.

In 1985, the ISO Pascal Working Group (then designated ISO/TC97/SC22/WG2, now ISO/IEC JTC1/ SC22/WG2) was reconvened after a long break. An Interpretations Subgroup was formed, to interpret doubtful or ambiguous portions of the Pascal standards. As a result of the work of this subgroup, and also of the work on the Extended Pascal standard being produced by WG2 and JPC, BS6192/IS07185 was revised and corrected during 1988/89; it is expected that ANSI/IEEE770X3.97-1983 will be replaced by the revised ISO 7185.

The major revisions to BS6192:1982 to produce the new ISO 7185 are:

  • a) resolution of the differences with ANSI/IEEE770X3.97-1983;
  • b) relaxation of the syntax of real numbers, to allow “digit sequences” rather than “unsigned integers” for the various components;
  • c) in the handling of “end-of-line characters” in text files;
  • d) in the handling of run-time errors.

1 Scope

1.1 This International Standard specifies the semantics and syntax of the computer programming language Pascal by specifying requirements for a processor and for a conforming program. Two levels of compliance are defined for both processors and programs.

1.2 This International Standard does not specify

  • a) the size or complexity of a program and its data that will exceed the capacity of any specific data processing system or the capacity of a particular processor, nor the actions to be taken when the corresponding limits are exceeded;
  • b) the minimal requirements of a data processing system that is capable of supporting an implementation of a processor for Pascal;
  • c) the method of activating the program-block or the set of commands used to control the environment in which a Pascal program is transformed and executed;
  • d) the mechanism by which programs written in Pascal are transformed for use by a data processing system;
  • e) the method for reporting errors or warnings;
  • f) the typographical representation of a program published for human reading.

2 Normative reference

The following standard contains provisions which, through reference in this text, constitute provisions of this International Standard. At the time of publication, the edition indicated was valid. All standards are subject to revision, and parties to agreements based on this International Standard are encouraged to investigate the possibility of applying the most recent edition of the standard listed below. Members of IEC and ISO maintain registers of currently valid International Standards.

  • ISO 646:1983, Information processing — ISO 7-bit coded character set for information interchange.

3 Definitions

For the purposes of this International Standard, the following definitions apply.

NOTE — To draw attention to language concepts, some terms are printed in italics on their first mention or at their defining occurrence(s) in this International Standard.

3.1 Error

A violation by a program of the requirements of this International Standard that a processor is permitted to leave undetected.

NOTES

  • 1 If it is possible to construct a program in which the violation or non-violation of this International Standard requires knowledge of the data read by the program or the implementation definition of implementation-defined features, then violation of that requirement is classified as an error. Processors may report on such violations of die requirement without such knowledge, but there always remain some cases that require execution, simulated execution, or proof procedures with the required knowledge. Requirements that can be verified without such knowledge are not classified as errors.
  • 2 Processors should attempt the detection of as many errors as possible, and to as complete a degree as possible. Permission to omit detection is provided for implementations in which the detection would be an excessive burden.

3.2 Extension

A modification to clause 6 of the requirements of this International Standard that does not invalidate any program complying with this International Standard, as defined by 5.2, except by prohibiting the use of one or more particular spellings of identifiers (see 6.1.2 and 6.1.3).

3.3 Implementation-defined

Possibly differing between processors, but defined for any particular processor.

3.4 Implementation-dependent

Possibly differing between processors and not necessarily defined for any particular processor.

3.5 Processor

A system or mechanism that accepts a program as input, prepares it for execution, and executes the process so defined with data to produce results.

NOTE — A processor may consist of an interpreter, a compiler and run-time system, or another mechanism, together with an associated host computing machine and operating system, or another mechanism for achieving the same effect. A compiler in itself, for example, does not constitute a processor.