CYBIL for NOS/VE Language Definition
Total Page:16
File Type:pdf, Size:1020Kb
CYBIL for NOS/VE CONTRPL Language Definition DATA Usage 60464113 NOTE Hie keywords, statements, and functions that were hsted an the inside front cover of die last edition have been moved. They are now hsted on facing pages inside the back cover of this manual, CYBIL for NOS/VE Language Definition Usage This product is intended for use only as described in this document. Control Data cannot be responsible for the proper functioning of undescribed features and parameters. Publication Number 60464113 Related Manuals Background (Access as Needed): SCL System Interface Quick Usage Reference 60464014 f 60464018 CYBIL Manual Set: CYBIL Keyed-File and Sort/Merge Interfaces Usage 60464117 Additional References: SCL Advanced File Management Usage , 60486413 |Q The shaded manual in the diagram is the manual you're using. —»- indicates a reading sequence. a indicates that the manual is available online. L © 1984,1985 by Control Data Corporation. All rights reserved. Printed in the United States of America. 2 CYBIL Language Definition Revision D Manual History This manual is Revision D, printed in October 1985. It reflects NOS/VE Version 1.1.3. at PSR level 644. Feature changes include: addition of the #SEQ function, addition of adaptable types as arguments for the #SIZE function, and addition of the INLINE attribute for user-defined functions. Minor technical corrections and editorial changes have been incorporated. This edition obsoletes all previous editions. Previous Revisions System Version Date A 1.0.2 February 1984 B 1.1.1 July 1984 C 1.1.2 March 1985 Revision D Manual History 3/4 Contents About This Manual 7 User-Defined Functions 6-17 System-Dependent Audience 7 Functions 6-23 Organization 7 The CYBIL Manual Set 7 Conventions 8 Procedures 7-1 Additional Related Manuals.. 9 Standard Procedures 7-1 Ordering Manuals 9 User-Defined Submitting Comments 9 Procedures 7-9 System-Dependent Introduction 1-1 Procedures 7-15 Program Structure 2-1 The CYBIL Command and Elements Within a Other Compilation Program 2-1 Facilities 8-1 Structure of a Program 2-8 CYBIL Command 8-1 FORMAT_CYBIL_SOURCE Constant, Variable, Type, and Command 8-7 Section Declarations 3-1 Compilation Declarations and Statements 8-8 Constant Declaration 3-1 Compile-Time Directives ... 8-12 Variable Declaration 3-3 Type Declaration 3-16 Section Declaration 3-18 The Debug Utility 9-1 Introduction 9-1 Types 4-1 Accessing Debug 9-2 Debug Concepts 9-5 Using Types 4-2 Debug Subcommands 9-18 Equivalent Types 4-2 Debug Functions 9-74 Basic Types 4-3 Using Debug 9-82 Structured Types 4-19 Storage Types 4-40 Adaptable Types 4-42 Glossary A-l Expressions and Character Set B-l Statements 5-1 Reserved Words C-l Expressions 5-1 Statements 5-13 Data Representation in Memory D-l Functions 6-1 Standard Functions 6-1 Index Index! Revision D Contents 5/6 About This Manual This manual describes CYBIL, the implementation language of the CONTROL DATA® Network Operating System/Virtual Environment (NOS/VE). Audience This manual is written as a reference for CYBIL programmers. It assumes that you understand NOS/VE and System Command Language (SCL) concepts as presented in the SCL Language Definition manual and the SCL System Interface manual. You will also need to be familiar with the CYBIL file manuals (described next under Organization) in order to perform input to and output from a CYBIL program. Organization This manual is organized by topic, based on elements of the CYBIL language. The first chapter introduces the basic elements of the language and refers you to the chapter in which each is further described. The CYBIL Manual Set This manual is part of the CYBIL manual set. Besides this manual, the CYBIL manual set includes the following: • The CYBIL System Interface manual, which describes the CYBIL procedures that pertain to command language services and processing, program services and management, task and job management services, condition processing, message generation, and interstate communication. • The CYBIL File Management manual, which describes the CYBIL procedures that assign files to device classes, specify attributes for files, and perform file opening, closing, and copying. • The CYBIL Sequential and Byte Addressable Files manual, which describes the CYBIL procedures that perform data manipulation on sequential and byte addressable files. • The CYBIL Keyed-File and Sort/Merge Interfaces manual, which describes: - The interface to NOS/VE keyed-files (that is, files having the indexed- sequential and direct-access file organizations). - The interface to NOS/VE Sort/Merge (which is used to sort records or merge files of sorted records). Revision D About This Manual 7 CONVENTIONS Conventions Within the formats for declarations, type specifications, and statements shown in this manual, uppercase letters represent reserved words; they must appear exactly as shown. Lowercase letters represent names and values that you supply. Required parameters are shown in bold type. Optional parameters are shown in italics and are enclosed by braces, as in: {PACKED} If the parameter is optional and can be repeated any number of times, it is also followed by several periods, as in: {name}... For example, the notation [digit] means zero digits or one digit can appear; {digit}... means zero, one, or more digits can appear. Braces also indicate that the enclosed parameters and reserved words are used together. For example, {offset MOD base} is considered a single parameter. Except for the braces and periods indicating repetition, all other symbols shown in a format must be included. Numbers are assumed to be decimal unless otherwise noted. In examples that show interactive terminal sessions, user input is printed in blue. System output is printed in black. New features, as well as changes, deletions, and additions to information in this manual, are indicated by vertical bars in the margins or by a dot near the page number if more than half the page is affected. 8 CYBIL Language Definition Revision D ADDITIONAL RELATED MANUALS Additional Related Manuals The related manuals listed on page 2 include the manuals you should be familiar with to this point, and which manuals you may want to read following this one. In addition, you may want to have a copy of the CDC® CYBER 170/180 Models 810, 815, 825, 830, 835, 845, 855, and 990 (Virtual State) Hardware Reference Manual, Volume II, publication number 60458890. You do not need the hardware manual to use the information in this CYBIL manual, but it is useful because it includes more detail about the hardware and, in particular, the hardware instructions used in certain CYBIL procedures described in this manual. The Math Library manual, publication number 60486513, describes the mathematical routines available in the Math Library. These routines can be accessed by CYBIL programs. The Diagnostic Messages for NOS/VE manual, publication number 60464613, documents diagnostic messages generated by NOS/VE. Ordering Manuals Control Data manuals are available through Control Data sales offices or through: Control Data Corporation Literature Distribution Services 308 North Dale Street St. Paul, Minnesota 55103 Submitting Comments The last page of this manual is a comment sheet. Please use it to give us your opinion of the manual's usability, to suggest specific improvements, and to report technical or typographical errors. If the comment sheet has already been used, you can mail your comments to: Control Data Corporation Publications and Graphics Division ARH219 4201 Lexington Avenue North St. Paul, Minnesota 55126-6198 Please indicate whether you would like a written response. Additionally, if you have access to SOLVER, an online facility for reporting problems, you can use it to submit comments about the manual. When entering your comments, use CIL as the product identifier. Revision D About This Manual 9 Introduction This chapter introduces the basic elements of a CYBIL program and refers you to the chapter in which each is further described. Introduction 1 A CYBIL program consists of two kinds of elements: declarations and statements. Declarations describe the data to be used in the program. Statements describe the actions to be performed on the data. Declarations and statements are made up of predefined reserved words and user-defined names and values. The way you form these elements is described in chapter 2, as is the general structure for designing a CYBIL program. Data can be either constant or variable. You can use the constant value itself or give it a name using the constant declaration (CONST). Variables are named, initialized, and given certain characteristics with the variable declaration (VAR). One of the characteristics of a variable is its type, for example, integer or character. You can use CYBIL's predefined types or define your own types. To define a new type or redefine an existing type with a new name, you use the type declaration (TYPE). Once you have defined a type, CYBIL will treat it as a standard data type; you can specify your new type name as a valid type in a variable declaration and CYBIL will perform standard type checking on it. You can also declare where you want certain variables to reside by defining an area called a section, which can be a read-only section or a read/write section. This is done with the SECTION declaration. All of these data-related declarations are described in chapter 3. Many standard types are available, including integers, floating-point numbers, characters, and boolean values, to name a few. In addition, you can use combinations of the standard types to define your own data types, for example, a record that contains several fields. The next few paragraphs summarize the types that are predefined by CYBIL. They are described in detail in chapter 4.