Description:
PL/I language discussions.
|
|
|
More PL/I compiler jewels
|
| |
PL/I for Windows:-
%process list, opt (time);
test: procedure options (main);
declare (a, b, c, x, y) float;
a = 3; b = 2; c = -1; x = 1.5;
y = a*x**2 + b*x + c;
put (y);
end;
; 7 y = a*x**2 + b*x + c;
mov dword ptr [ebp-0a0h],0410c0000h; Y
...
align 04h
@CBE12 dd 410c0000r ; 8.7500000e+00... more »
|
|
More PL/I compiler jewels...
|
| |
The compilers used for the samples in this post are
5655-H31 IBM(R) Enterprise PL/I for z/OS V3.R9.M0 (Built:20100923)
and
5724-B67 IBM(R) PL/I for Windows 8.0 (Built:20110825)
It may be that the newer versions of Enterprise PL/I (i.e. V4.1 and V4.2) have already addressed issues as the one described here.... more »
|
|
Comparison of compiler generated code AD 1980(ish) v 2010(ish)
|
| |
Can anyone skilled in the art tell me why a compiler that probably dates back to the late 1970'ies or early 1980'ies generates the following short and sweet code for a PL/I "BY NAME" assignment, while the not completely new (but still fairly recent) version of Enterprise PL/I (V3R9) generates the very, very, very... more »
|
|
Knuth's "Man or Boy"
|
| |
The following is a PL/I version of Donald Knuth's "Man or Boy" compiler test program:
morb: proc options (main) reorder;
dcl sysprint file;
dcl i fixed bin (31);
do i = 0 to 30;
put skip edit('i = ', i, a((i), x1, x2, x3, x4, x5))
(a(4), p'z9b', P'---,---,--9');... more »
|
|
Loop control
|
| |
...
In PL/I, that would be detected as an integer overflow error at run-time.
Moreover, PL/I provides the means to deal with loops that terminate
at some hardware upper limit, without overflowing:
DO I = 0 UPTHRU 2147483647;
Such a loop is handled differently from the conventional one where "TO" is used:... more »
|
|
Compiler quality [Was: GO TO "cobol"]
|
| |
...
Oh yes there is, that miracle of a compiler technology called
Enterprise PL/I V3R9...
70.0 19 1 do i = 1 to 10;
71.0 20 1 1 do j = 1 to 10;
72.0 21 1 2 t = 'Oops';
73.0 22 1 2 put skip list(substr(t, 1, 1));
74.0 23 1 2 end;... more »
|
|
How to build the o/p from PLISAXC
|
| |
...
From someone who works at Den Danske Bank, I (OK, fresh from the S0C1 debacle...) would have expected to provide us with a bit more information. Data doesn't just end up in the spool all by itself, but it does do so when you blindly copy the example given in the manual, and given the extreme similarity of your output and the output of the... more »
|
|
Simple snake game in PL/I
|
| |
Hi all,
I am currently writing a simple Snake game for Windows in PL/I. A work
in progress code is available here: [link]
Any tips for improving my PL/I code?
|
|
|