DEC C
User's Guide for OpenVMS Systems


Previous Contents Index

parameter: A variable listed in the parentheses and declared between the function identifier and body in the function definition. The parameter receives a copy of the value of an associated argument when the function is called. The items in parentheses in a macro definition are also called parameters, but the semantics are different from C function calls.

pointer: A variable that contains the address (lvalue) of another variable or function. A pointer is declared with the unary asterisk operator (*).

portability: The ability to compile an unaltered C source program on several operating systems and machines; in this guide particularly, between UNIX and OpenVMS systems.

pragma: A preprocessor directive that produces implementation-specific results. Certain pragmas may not be portable, but other compilers may support pragmas that are supported by DEC C for OpenVMS Systems. See also preprocessor directives.

precedence of operators: The order in which operations are performed. If an expression contains several operators, the operations are executed in the following order: primary expression operators, unary operators, binary operators, the conditional operator, assignment operators, and the comma operator.

preprocessor directives: Lines of text in a C source file that change the order or manner of subsequent compilation. The directives are #define , for macro substitution and other replacements; #undef , to cancel a previous #define ; #include , to include an external source text; #line , to specify a line number to the compiler; #module , to specify a module name to the linker; #dictionary , to extract data structures from the Common Data Dictionary; #pragma , to give the compiler implementation-specific information; and #if , #ifdef , #ifndef , #else , #elif , #endif , to place conditions on the compilation of sections of a program. In DEC C, these directives are processed by an early phase of the compiler, not by a separate program.

primary expression: An expression that contains only a primary-expression operator or no operator. Primary expressions include previously declared identifiers, constants, strings, function calls, subscripted expressions, and references to structure or union members.

primary-expression operator: An operator that qualifies a primary expression. The set of such operators consists of paired brackets ([ ]) to enclose a single subscript; paired parentheses (( )) to enclose an argument list or to change the associative precedence of operators; a period (.) to qualify a structure or union name with the name of a member; and an arrow (-->) to qualify a structure or union member with a pointer or other address-valued expression.

program section (psect): An area of virtual memory that has a name, a size, and a series of attributes that describe the intended or permitted usage of that permanent variable. Variables of type static , and of all external and global types are placed in psects. See also lifetime.

refresh: A Curses Screen Management term describing the updating of the terminal screen so that the latest contents of defined windows are placed on the screen. No edits made to any window can appear on the terminal screen until you refresh the window on the screen using refresh , wrefresh , or touchwin . See also Curses.

relational operator: One of the operators less than (<), greater than (>), less than or equal to (<=), or greater than or equal to (>=). The result (which is of type int ) is 1 or 0, indicating a true or false relation, respectively. If necessary, the arithmetic conversions are performed on the two operands. Relational operators group from left to right.

run-time library: In DEC C for OpenVMS Systems, the group of common functions and macros that accompany the compiler that may be called to perform I/O tasks, character-string manipulation, math tasks, system calls, and various other tasks. The C language includes no facilities to administer I/O, so compilers include run-time libraries to provide this service. The DEC C Run-Time Library (RTL) is shipped with the OpenVMS operating system. You can access the DEC C RTL by receiving a copy of the function module in your program's image, or by sharing the function image with your program so that control is passed to the function image and then back to your program. See also shareable image.

rvalue: The object stored at a location in memory represented by an identifier. The rvalue of a variable is the variable's object. See also lvalue and object.

scalar: Single objects, including pointers, that can be manipulated in their entirety, in an arithmetic expression. See also object and aggregate.

scope: The portion of a program in which a particular name has meaning. The link-time scope of names declared in external definitions possibly extends from the point of the definition's occurrence to the end of the program. The scope of the names of function parameters is the function itself. The scope of names declared in any block (that is, after the brace beginning any compound statement) is restricted to that block. Names declared in a block supersede any other declaration of the name, including external definitions, for the extent of that block. Tags within struct , union , typedef , and enum declarations are identifiers that are subject to the same scope rules as any identifiers. Member names in structure or union references are not subject to the same scope rules (see uniqueness). The scope of a label is the entire function containing the label.

shareable image: An OpenVMS image that passes control to another image that passes control back to the original program. You can access the DEC C Run-Time Library (RTL) as a shared image; control is passed to the DEC C RTL and then back to your program instead of a copy of the function's object module being copied into your program's image.

shift operator: One of the binary operators (<<) or (>>). Both operands must have integral types. The value of the expression E1<< E2 is the result of expression E1 (interpreted as a bit pattern) left-shifted by E2 bits. The value of E1 >>E2 is E1 right-shifted by E2 bits.

statement: The language elements that perform the action of a function. Statements include expression statements (an expression followed by a semicolon), null statements (the semicolon by itself), compound statements (blocks), and an assortment of statements identified by keywords (such as return , switch , and do ).

static storage class: A storage class that permits identifiers to be recognized possibly from the point of the declaration to the end of the compilation unit. Identifiers of the static storage class are declared using the static storage-class specifier. See also scope.

stderr: The predefined file pointer associated with the terminal to report run-time errors. The pointed file is equivalent to the OpenVMS logical SYS$ERROR and the file descriptor 2. To use this definition, include the stdio definition module in your source code using the #include preprocessor directive.

stdin: The predefined file pointer associated with the terminal to perform input. The pointed file is equivalent to the OpenVMS logical SYS$INPUT and the file descriptor 0. For example, if you specify stdin as the pointer to the file to read from in the getc macro, the macro reads from the terminal. To use this definition, include the stdio definition module in your source code using the #include preprocessor directive.

stdout: The predefined file pointer associated with the terminal to perform output. The pointed file is equivalent to the OpenVMS logical SYS$OUTPUT and the file descriptor 1. For example, if you specify stdout as the pointer to the file to write to in the putc macro, the macro writes to the terminal. To use this definition, include the definition module stdio in your source code using the #include preprocessor directive.

storage class: The attribute that, with its type, determines the location, lifetime, and scope of an identifier's storage. Examples are static , external , and auto .

storage-class modifier: Keywords used with the storage-class and data-type keywords to change program section attributes of variables, which restricts access to them. The two storage-class modifiers are noshare and readonly .

string:


structure: An aggregate type consisting of a sequence of named members. Each member may have either a scalar or an aggregate type. A structure member may also consist of a specified number of bits called a bit field.

symbolic constant: An identifier assigned a constant value by a #define directive. You may use a symbolic constant wherever a literal is valid.

tags: Identifiers that represent a declaration of the data types struct , union , or enum . You may use tags in declarations from that point onward in the program to declare other variables of the same type without having to key in the lengthy declaration again.

tokens: The fundamental elements making up the text of a C program. Tokens are identifiers, keywords, constants, strings, operators, and other separators. White space (such as spaces, tabs, new lines, and comments) is ignored except where it is necessary to separate tokens.

type: The attribute that, with its storage class, determines the meaning of the values found in the identifier's storage. Types include the integral and floating types, pointers, enumerated types, the void data type, and the derived types array, function, structure, and union .

type name: The declaration of an object of a given type that omits the object identifier. A type name is used as the operand of the cast and sizeof operators.

unary operator: An operator that takes a single operand. In C, unary operators either precede or follow the operand. The set includes the asterisk (indirection), ampersand (address of), minus (arithmetic unary minus), exclamation (logical negation), tilde (one's complement), double plus (increment), double minus (decrement), cast (force type conversion), and sizeof (yields the size, in bytes, of its operand) operators.

union: A union is an aggregate type that can be considered a structure, all of whose members begin at offset 0 from the base, and whose size is sufficient to contain any of its members. A union can only contain the value of one member at a time.

uniqueness: A property of the names used for certain structure and union members. A name is unique if either of the following conditions is true:

The significance of uniqueness is that a unique member name can possibly be used to refer to a structure in which the member name was not declared (although a warning message is issued).

variable: An identifier used as the name of an object.

value: The result of an expression. For example, when a variable on the right side of an assignment expression is evaluated, the value obtained is the object (rvalue) of the variable; when a variable on the left side of an assignment expression is evaluated, the value obtained is the address (lvalue) of the variable.

white space: Spaces, tabs, new lines, and comments. The compiler defines where you can and cannot place these characters.

windows: In the Curses Screen Management package, the defined rectangular regions on the terminal screen that you can write upon, rearrange, move to new positions on the screen, and delete from the screen. You define windows by specifying the upper left corner coordinate, the number of lines, and the number of columns comprising the window. To see the results after editing a window, you must refresh the window on the terminal screen. See also refresh.


Index Contents