AS 3981-1991 Information technology - Programming languages - Extended Pascal

Document Sample
AS 3981-1991 Information technology - Programming languages - Extended Pascal Powered By Docstoc
					                                                                                                             AS 3981 —1991
                                                                                                             ISO/IEC 10206: 1991




                                                                                           Australian Standard®
This is a free 8 page sample. Access the full version at http://infostore.saiglobal.com.




                                                                                           Information technology—
                                                                                           Programming languages—Extended
                                                                                           Pascal
                                                                                           This Australian Standard was prepared by Committee IT/9, Information Systems —
                                                                                           Vocabulary and Software. It was approved on behalf of the Council of Standards
                                                                                           Australia on 14 August 1991 and published on 14 October 1991.




                                                                                           The following interests are represented on Committee IT/9:
                                                                                               Attorney-Generals Department
This is a free 8 page sample. Access the full version at http://infostore.saiglobal.com.




                                                                                               AUSTEL
                                                                                               Australian Bankers’ Association
                                                                                               Australian Bureau of Statistics
                                                                                               Australian Chamber of Manufactures
                                                                                               Australian Computer Society
                                                                                               Australian Computer Users Association
                                                                                               Department of Defence
                                                                                               Department of Finance
                                                                                               Landata
                                                                                               Telecom Australia
                                                                                               Universities and colleges




                                                                                           Review of Australian Standards. To keep abreast of progress in industry, Australian Standards are subject
                                                                                           to periodic review and are kept up to date by the issue of amendments or new edit ions as necessary. It is
                                                                                           important therefore that Standards users ensure that they are in possession of the latest edit ion, and any
                                                                                           amendments thereto.
                                                                                           Full detail s of all Australi an Standards and related publications will be found in the Standards Australi a
                                                                                           Catalogue of Publications; this information is supplemented each month by the magazine ‘The Australi an
                                                                                           Standard’, which subscribing members receive, and which gives detail s of new publications, new edit ions
                                                                                           and amendments, and of withdrawn Standards.
                                                                                           Suggesti ons for improvements to Australian Standards, addressed to the head off ice of Standards Australi a,
                                                                                           are welcomed. Notif ication of any inaccuracy or ambiguit y found in an Australi an Standard should be made
                                                                                           without delay in order that the matter may be investigated and appropriate action taken.
                                                                                                                                AS 3981 —1991




                                                                                           Australian Standard®
This is a free 8 page sample. Access the full version at http://infostore.saiglobal.com.




                                                                                           Information technology—
                                                                                           Programming languages—Extended
                                                                                           Pascal




                                                                                            First publi shed as AS 3981—1991.




                                                                                           PUBLISHED BY STANDARDS AUSTRALIA
                                                                                           (STANDARDS ASSOCIATION OF AUSTRALIA)
                                                                                           1 THE CRESCENT, HOMEBUSH, NSW 2140
                                                                                                                                    ISBN 0 7262 7094 6
                                                                                                                                                           2

                                                                                                                                                     PREFACE
                                                                                              This Standard was prepared by the Standards Australia Committee on Information Systems —
                                                                                              Vocabulary and Software. It is identical with and has been reproduced from ISO/IEC 10206: 1991
                                                                                              Information technology — Programming languages — Extended Pascal.
                                                                                              Under arrangements made between Standards Australia and the international Standards bodies, ISO
                                                                                              and IEC, as well as certain other Standards organizations, users of this Australian Standard are advised
                                                                                              of the following:
                                                                                              (a) Copyright is vested in Standards Australia.
                                                                                              (b) The number of this Standard is not reproduced on each page; its identity is shown only on the
                                                                                                   cover and title pages.
                                                                                              For the purposes of this Australian Standard, the ISO/IEC text should be modified as follows:
                                                                                              (i) Terminology The words ‘Australian Standard’ should replace the words ‘International Standard’
                                                                                                   wherever they appear.
                                                                                              (ii) References The references to International Standards should be replaced by references to
                                                                                                   Australian Standards as follows:
This is a free 8 page sample. Access the full version at http://infostore.saiglobal.com.




                                                                                                    Reference to International Standard                           Australian Standard
                                                                                                    ISO/IEC                                                       AS
                                                                                                    646 Information processing — ISO 7-bit                        1776 Information processing — 7-bit coded
                                                                                                          coded character set for information                           character set for i nformat i on
                                                                                                          interchange                                                   interchange




                                                                                                                                        © Copyri ght STANDARDS AUSTRALIA
                                                                                           Users of Standards are reminded that copyri ght subsists in all Standards Australi a publications and soft ware. Except where the
                                                                                           Copyri ght Act all ows and except where provided for below no publications or software produced by Standards Austr alia may be
                                                                                           reproduced, stored in a retri eval system in any form or transmitt ed by any means without pri or permission in wri ti ng fr om
                                                                                           Standards Australi a. Permission may be conditi onal on an appropriate royalt y payment. Requests for permission and information on
                                                                                           commercial soft ware royalti es should be dir ected to the head off ice of Standards Australi a.
                                                                                                Standards Australi a wil l permit up to 10 percent of the technical content pages of a Standard to be copied for use
                                                                                                exclusively in-house by purchasers of the Standard without payment of a royalty or advice to Standards Austr alia.
                                                                                                Standards Australi a wil l also permit the inclusion of its copyri ght material in computer soft ware programs for no royalt y
                                                                                                payment provided such programs are used exclusively in-house by the creators of the programs.
                                                                                           Care should be taken to ensure that material used is fr om the current editi on of the Standard and that it is updated whenever the
                                                                                           Standard is amended or revised. The number and date of the Standard should therefore be clearly identif ied.
                                                                                           The use of material in pri nt form or in computer soft ware programs to be used commercially, with or without payment, or in
                                                                                           commercial contracts is subject to the payment of a royalty. This policy may be vari ed by Standards Austr alia at any ti me.
                                                                                                                                                        3

                                                                                                                                              CONTENTS


                                                                                                                                                                                                                     Page

                                                                                           1   Scope . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .      6

                                                                                           2   Normative reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .            6
                                                                                           3   Definitions       .. .. . .. ... . ... .. . .. .. .. . .. ... . ... . .. ... ... .. . .. ... . . 6

                                                                                               3.1     Dynamic-violation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
                                                                                               3.2     Error . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .    7

                                                                                               3.3     Extension . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .        7
                                                                                               3.4     Implementation-defined             .. .. . .. ... . ... .. . .. .. .. . .. ... . ... . .. ...                      7

                                                                                               3.5     Implementation-dependent               .. .. . .. ... . ... .. . .. .. .. . .. ... . ... . .. .                    7
                                                                                               3.6     Processor       .. .. . .. ... . ... .. . .. .. .. . .. ... . ... . .. ... ... .. . .. ..                          7
This is a free 8 page sample. Access the full version at http://infostore.saiglobal.com.




                                                                                           4   Definitional conventions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
                                                                                           5   Compliance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8

                                                                                               5.1     Processors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .       9
                                                                                               5.2     Programs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .        10

                                                                                           6   Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .          10
                                                                                               6.1     Lexical tokens . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .          10

                                                                                                       6.1.1     General . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .       10
                                                                                                       6.1.2     Special-symbols . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .           11

                                                                                                       6.1.3     Identifiers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .       11
                                                                                                       6.1.4     Remote-directives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .             11

                                                                                                       6.1.5     Interface-directives         .. .. . .. ... . ... .. . .. .. .. . .. ... . ... . ..                     12
                                                                                                       6.1.6     Implementation-directives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .               12

                                                                                                       6.1.7     Numbers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .         12
                                                                                                       6.1.8     Labels . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .        13

                                                                                                       6.1.9     Character-strings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .           13
                                                                                                       6.1.10 Token separators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .               14

                                                                                                       6.1.11 Lexical alternatives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .               14
                                                                                               6.2     Blocks, scopes, activations, and states . . . . . . . . . . . . . . . . . . . . . . . . . . . .                   15

                                                                                                       6.2.1     Blocks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .        15
                                                                                                       6.2.2     Scopes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .        15

                                                                                                       6.2.3     Activations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .         18
                                                                                                       6.2.4     States . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .      20

                                                                                               6.3     Constants . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .         21
                                                                                                       6.3.1     General . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .       21

                                                                                                       6.3.2     Example of a constant-definition-part . . . . . . . . . . . . . . . . . . . . . . . .                   22
                                                                                               6.4     Types and schemata . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .              22

                                                                                                       6.4.1     Type-definitions         .. .. . .. ... . ... .. . .. .. .. . .. ... . ... . .. ..                      22
                                                                                                       6.4.2     Simple-types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .          24
                                                                                                                                                 4
                                                                                                                                                                                                                Page
                                                                                                 6.4.3    Structured-types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .          29
                                                                                                 6.4.4    Pointer-types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .         37
                                                                                                 6.4.5    Compatible types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .            38
                                                                                                 6.4.6    Assignment-compatibility . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .                38
                                                                                                 6.4.7    Schema-definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .            39
                                                                                                 6.4.8    Discriminated-schemata . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .                40
                                                                                                 6.4.9    Type-inquiry . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .          41
                                                                                                 6.4.10 Example of a type-definition-part                  .. .. . .. ... . ... .. . .. .. .. . ..                41
                                                                                           6.5   Declarations and denotations of variables . . . . . . . . . . . . . . . . . . . . . . . . . .                    43
                                                                                                 6.5.1    Variable-declarations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .             43
                                                                                                 6.5.2    Entire-variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .          44
This is a free 8 page sample. Access the full version at http://infostore.saiglobal.com.




                                                                                                 6.5.3    Component-variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .               44
                                                                                                 6.5.4    Identified-variables          .. .. . .. ... . ... .. . .. .. .. . .. ... . ... . ..                    46
                                                                                                 6.5.5    Buffer-variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .          46
                                                                                                 6.5.6    Substring-variables           .. .. . .. ... . ... .. . .. .. .. . .. ... . ... . ..                    47
                                                                                           6.6   Initial states . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .     47
                                                                                           6.7   Procedure and function declarations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .                  48
                                                                                                 6.7.1    Procedure-declarations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .              48
                                                                                                 6.7.2    Function-declarations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .             50
                                                                                                 6.7.3    Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .          53
                                                                                                 6.7.4    Required procedures and functions . . . . . . . . . . . . . . . . . . . . . . . . .                     61
                                                                                                 6.7.5    Required procedures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .             61
                                                                                                 6.7.6    Required functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .            68
                                                                                           6.8   Expressions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .        74
                                                                                                 6.8.1    General . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .       74
                                                                                                 6.8.2    Constant-expressions            .. .. . .. ... . ... .. . .. .. .. . .. ... . ... . .                   76
                                                                                                 6.8.3    Operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .         76
                                                                                                 6.8.4    Schema-discriminants . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .              80
                                                                                                 6.8.5    Function-designators            .. .. . .. ... . ... .. . .. .. .. . .. ... . ... . .                   81
                                                                                                 6.8.6    Function-accesses           .. .. . .. ... . ... .. . .. .. .. . .. ... . ... . .. .                    81
                                                                                                 6.8.7    Structured-value-constructors              .. .. . .. ... . ... .. . .. .. .. . .. ...                  83
                                                                                                 6.8.8    Constant-accesses           .. .. . .. ... . ... .. . .. .. .. . .. ... . ... . .. .                    85
                                                                                           6.9   Statements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .       87
                                                                                                 6.9.1    General . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .       87
                                                                                                 6.9.2    Simple-statements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .             87
                                                                                                 6.9.3    Structured-statements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .             89
                                                                                                 6.9.4    Threats . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .       95
                                                                                           6.10 Input and output          .. .. . .. ... . ... .. . .. .. .. . .. ... . ... . .. ... ... .                        96
                                                                                                 6.10.1 The procedure read . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .                96
                                                                                                 6.10.2 The procedure readln . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .                97
                                                                                                 6.10.3 The procedure write . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .               98
                                                                                                                                                   5
                                                                                                                                                                                                               Page
                                                                                                   6.10.4 The procedure writeln . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .               101
                                                                                                   6.10.5 The procedure page . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .              102
                                                                                           6.11 Modules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .         102
                                                                                                   6.11.1 Module-declarations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .             102
                                                                                                   6.11.2 Export-part . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .         104
                                                                                                   6.11.3 Import-specifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .             105
                                                                                                   6.11.4 Required interfaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .             107
                                                                                                   6.11.5 Example of a module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .               107
                                                                                                   6.11.6 Examples of program-components that are module-
                                                                                                          declarations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .        109
                                                                                                   6.11.7 Example of exporting a range of enumerated-type values . . . . . . . . .                              116
                                                                                           6.12 Main-program-declarations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .                 117
This is a free 8 page sample. Access the full version at http://infostore.saiglobal.com.




                                                                                           6.13 Programs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .        119
                                                                                           Annexes
                                                                                           Annex A          Collected syntax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .          121
                                                                                           Annex B          Incompatibilities with Pascal standards . . . . . . . . . . . . . . . . . . . . .                   181
                                                                                           Annex C          Required identifiers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .          182
                                                                                           Annex D          Errors and dynamic-violations . . . . . . . . . . . . . . . . . . . . . . . . . . . .               183
                                                                                           Annex E          Implementation-defined features . . . . . . . . . . . . . . . . . . . . . . . . . .                 191
                                                                                           Annex F          Implementation-dependent features . . . . . . . . . . . . . . . . . . . . . . . .                   194
                                                                                           Annex G          Bibliography . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .        196
                                                                                           Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .    197
                                                                                           AUSTRALIAN STANDARD                                      6




                                                                                            Information technology — Programming
                                                                                            languages —Extended Pascal


                                                                                            1 Scope
                                                                                            1.1
                                                                                            This International Standard specifies the semantics and syntax of the computer programming language
This is a free 8 page sample. Access the full version at http://infostore.saiglobal.com.




                                                                                            Extended 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 Extended Pascal;
                                                                                            c)    the method of activating the program-block or the set of commands used to control the environment
                                                                                                  in which an Extended Pascal program is transformed and executed;
                                                                                            d)    the mechanism by which programs written in Extended 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.
                                                                                            NO TE — 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.




                                                                                                                                               COPYRIGHT
                                                                                                   This is a free preview. Purchase the entire publication at the link below:




                                                                                                             AS 3981-1991, Information technology -
                                                                                                             Programming languages - Extended Pascal
This is a free 8 page sample. Access the full version at http://infostore.saiglobal.com.




                                                                                              Looking for additional Standards? Visit SAI Global Infostore
                                                                                              Subscribe to our Free Newsletters about Australian Standards® in Legislation; ISO, IEC, BSI and more
                                                                                              Do you need to Manage Standards Collections Online?
                                                                                              Learn about LexConnect, All Jurisdictions, Standards referenced in Australian legislation
                                                                                              Do you want to know when a Standard has changed?
                                                                                              Want to become an SAI Global Standards Sales Affiliate?

                                                                                           Learn about other SAI Global Services:

                                                                                              LOGICOM Military Parts and Supplier Database
                                                                                              Metals Infobase Database of Metal Grades, Standards and Manufacturers
                                                                                              Materials Infobase Database of Materials, Standards and Suppliers
                                                                                              Database of European Law, CELEX and Court Decisions




                                                                                                          Need to speak with a Customer Service Representative - Contact Us

				
DOCUMENT INFO
Shared By:
Categories:
Tags:
Stats:
views:1
posted:7/5/2012
language:
pages:9
SAIGlobalAPAC SAIGlobalAPAC http://
About