Pragmatic directives: Difference between revisions
Content deleted Content added
PatGarrett (talk | contribs) →{{header|PL/I}}: Section added |
PatGarrett (talk | contribs) m →{{header|PL/I}}: Superfluous blanks suppressed |
||
Line 311: | Line 311: | ||
an array. |
an array. |
||
For example: |
For example: |
||
<lang pli> |
<lang pli> declare (t(100),i) fixed binary; |
||
declare (t(100),i) fixed binary; |
|||
i=101; |
i=101; |
||
t(i)=0; |
t(i)=0;</lang> |
||
</lang> |
|||
will cause unpredictible results. |
will cause unpredictible results. |
||
And : |
And : |
||
⚫ | |||
</lang> |
|||
<lang pli> |
|||
⚫ | |||
declare (t(100),i) fixed binary; |
declare (t(100),i) fixed binary; |
||
i=101; |
i=101; |
||
t(i)=0; |
t(i)=0; |
||
end; |
end;</lang> |
||
</lang> |
|||
will issue the message : "The SubscriptRange condition was raised." at execution time. |
will issue the message : "The SubscriptRange condition was raised." at execution time. |
||
Or, it can be handle by an on-unit. |
Or, it can be handle by an on-unit. |
||
<lang pli> |
<lang pli> (SubscriptRange): begin; |
||
(SubscriptRange): begin; |
|||
declare (t(100),i) fixed binary; |
declare (t(100),i) fixed binary; |
||
i=101; |
i=101; |
||
Line 335: | Line 329: | ||
t(i)=0; |
t(i)=0; |
||
e:on SubscriptRange system; /* default dehaviour */ |
e:on SubscriptRange system; /* default dehaviour */ |
||
end; |
end;</lang> |
||
</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 |
||
Line 345: | Line 338: | ||
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. |
||
=={{header|Python}}== |
=={{header|Python}}== |