Pragmatic directives: Difference between revisions

Content added Content deleted
m (→‎{{header|PL/I}}: Superfluous blanks suppressed)
Line 304: Line 304:
=={{header|PL/I}}==
=={{header|PL/I}}==
Disabled on-conditions can be seen as pragmatic directives.
Disabled on-conditions can be seen as pragmatic directives.
<br>SubscriptRange (SUBRG), StringRange (STRG), StringSize (STRZ), Size conditions
<br>'''SubscriptRange''' (SUBRG), '''StringRange''' (STRG), '''StringSize''' (STRZ), '''Size''' conditions
can be enabled for a PROCEDURE or a BEGIN block.
can be enabled for a PROCEDURE or a BEGIN block.
<br>By default, for optimization reasons,
<br>By default, for optimization reasons,
SubscriptRange,StringRange,StringSize,Size are disabled.
SubscriptRange,StringRange,StringSize,Size are disabled.
<br>If enabled the SubscriptRange condition is raised for out-of-bound subscript of
<br>If enabled the '''SubscriptRange''' condition is raised for out-of-bound subscript of
an array.
an array.
For example:
For example:
Line 331: Line 331:
end;</lang>
end;</lang>
<br>And the same way for a string,
<br>And the same way for a string,
the StringRange condition is raised when a substring reference is beyond
the '''StringRange''' condition is raised when a substring reference is beyond
the span of the string.
the span of the string.
<br>And finally.
<br>And finally.
The StringSize condition is raised when a string is shorten
The '''StringSize''' condition is raised when a string is shorten
as a result of a convertion assigment.
as a result of a convertion assigment.
The Size condition is raised when a numerical value is shorten
The '''Size condition''' is raised when a numerical value is shorten
as a result of a convertion assigment.
as a result of a convertion assigment.