Category:PL/I: Difference between revisions

From Rosetta Code
Content added Content deleted
No edit summary
(Normal formatting)
Line 1: Line 1:
{{stub}}{{language|PL/I}}
{{stub}}{{language|PL/I}}

<lang>
PL/I is a general purpose programming language suitable for commercial, scientific, non-scientific, and system programming.
PL/I is a general purpose programming language suitable for commercial, scientific, non-scientific, and system programming.


It provides the following data types:
It provides the following data types:


Floating-point,
* Floating-point,
Decimal integer,
* Decimal integer,
Binary integer,
* Binary integer,
Fixed-point decimal (with fractional part),
* Fixed-point decimal (with fractional part),
Fixed-point binary (that is, with fractional part),
* Fixed-point binary (that is, with fractional part),
Character strings of two kinds:
* Character strings of two kinds:
1. fixed-length, and
# fixed-length, and
2. varying-length.
# varying-length.
Bit strings of two kinds:
* Bit strings of two kinds:
1. fixed-length, and
# fixed-length, and
2. varying length.
# varying length.


The float, integer,and fixed-point types can be real or complex.
The float, integer,and fixed-point types can be real or complex.


Multiple precisions are available for binary fixed-point:
Multiple precisions are available for binary fixed-point:
* 8 bits,
typically using 8 bits, 16 bits, 32 bits, and 64 bits.
* 16 bits,
* 32 bits, and
* 64 bits.


Multiple precisions are available for floating point:
Multiple precisions are available for floating point:
typically using 32 bits, 64 bits, and 80 bits.
* 32 bits,
* 64 bits, and
* 80 bits.


The language provides for static and dynamic arrays.
The language provides for static and dynamic arrays. Of the latter, there are automatic and controlled.
Of the latter, there are automatic and controlled.
Controlled can be aplied to any data type, including
Controlled can be applied to any data type, including scalar, structure, as well as arrays. With controlled, a push-down and pop-up stack is automatically used.
scalar, structure, as well as arrays.
With controlled, a push-down and pop-up stack is automatically used.


PL/I has four kinds of I/O:
PL/I has four kinds of I/O:
For simple I/O commands, list-directed input and output
# For simple I/O commands, list-directed input and output requires only the names of the variables. Default format is used, based on the variable's declaration.
requires only the names of the variables.
# For simple I/O commands, data-directed input and output requires only the names of the variables. For this form, both the names of the variables and their values are transmitted.
# When precise layouts of input and output data is required, edit-directed I/O is used. A format is specified by the user. The format is flexible, and permits the number of digits, and the number of places after the decimal point to be specified dynamically. The format may also be specified in picture form.
Default format is used, based onthe variable's declaration.
# for files held on storage media, record-oriented transmission is often used, either for sequential or random access.
For simple I/O commands, data-directed input and output

requires only the names of the variables. For this form,
PL/I has built-in checking for such programmer conditions including
both the names of the variables and their values are transmitted.
* subscript-range checking,
When precise layouts of input and output data is required,
* floating-point overflow,
edit-directed I/O is used. A format is specified by the user.
* fixed-point overflow,
The format is flexible, and permits the number of digits, and
* division by zero,
the number of places after the decimal point to be specified
* sub-string range checking, and
dynamically. The format may also be specified in picture form.
* string-size checking.
for files held on storage media, record-oriented transmission
is often used, either for sequential or random access.


Any of those may be enabled or disabled by the user.
PL/I has built-in checking for such programmer conditions
including subscript-range checking, floating-point overflow,
fixed-point overflow, division by zero, substring range checking,
and stringsize checking. Any of those may be enabled or disabled
by the user.


When any of those conditions occurs, the user may trap them and
When any of those conditions occurs, the user may trap them and recover from them and continue execution.
recover from them and continue execution.
</lang>

Revision as of 15:15, 21 August 2011

This page is a stub. It needs more information! You can help Rosetta Code by filling it in!
Language
PL/I
This programming language may be used to instruct a computer to perform a task.
See Also:


Listed below are all of the tasks on Rosetta Code which have been solved using PL/I.

PL/I is a general purpose programming language suitable for commercial, scientific, non-scientific, and system programming.

It provides the following data types:

  • Floating-point,
  • Decimal integer,
  • Binary integer,
  • Fixed-point decimal (with fractional part),
  • Fixed-point binary (that is, with fractional part),
  • Character strings of two kinds:
  1. fixed-length, and
  2. varying-length.
  • Bit strings of two kinds:
  1. fixed-length, and
  2. varying length.

The float, integer,and fixed-point types can be real or complex.

Multiple precisions are available for binary fixed-point:

  • 8 bits,
  • 16 bits,
  • 32 bits, and
  • 64 bits.

Multiple precisions are available for floating point:

  • 32 bits,
  • 64 bits, and
  • 80 bits.

The language provides for static and dynamic arrays. Of the latter, there are automatic and controlled.

Controlled can be applied to any data type, including scalar, structure, as well as arrays. With controlled, a push-down and pop-up stack is automatically used.

PL/I has four kinds of I/O:

  1. For simple I/O commands, list-directed input and output requires only the names of the variables. Default format is used, based on the variable's declaration.
  2. For simple I/O commands, data-directed input and output requires only the names of the variables. For this form, both the names of the variables and their values are transmitted.
  3. When precise layouts of input and output data is required, edit-directed I/O is used. A format is specified by the user. The format is flexible, and permits the number of digits, and the number of places after the decimal point to be specified dynamically. The format may also be specified in picture form.
  4. for files held on storage media, record-oriented transmission is often used, either for sequential or random access.

PL/I has built-in checking for such programmer conditions including

  • subscript-range checking,
  • floating-point overflow,
  • fixed-point overflow,
  • division by zero,
  • sub-string range checking, and
  • string-size checking.

Any of those may be enabled or disabled by the user.

When any of those conditions occurs, the user may trap them and recover from them and continue execution.

Subcategories

This category has the following 3 subcategories, out of 3 total.

Pages in category "PL/I"

The following 200 pages are in this category, out of 447 total.

(previous page) (next page)
(previous page) (next page)