From Wikipedia [L1 ], the free encyclopedia:
escargo 17 Jan 2007 - And still in active development at http://sourceforge.net/projects/pl1gcc/
PL/I for OpenVMS[L2 ] is in active development and fully supported by Kednos Corp http://www.kednos.com
An extended version of PL/I, EPL, was the programming language for the implementation of Multics.
Also known as PL/1 (where the discussion on the topic also exists).
mytest:
proc(cmdArgs, envBlk) options(main); dcl cmdArgs char(127) var, envBlk char(127); dcl (max, i, j) fixed bin, base_page_ptr ptr, 1 base_page based (base_page_ptr), 2 pad1 (32) fixed bin(15), 2 psp_seg fixed bin(15); dcl cmdLine_ptr ptr, cmdLine char(127) var based (cmdLine_ptr); dcl dateNow char(6), timeNow char(9); dcl junk_waffle fixed bin(7) static initial (20); dateNow = DATE(); timeNow = TIME(); put skip list (dateNow); put skip list (timeNow); put skip edit (substr(dateNow,3,2),'/',substr(dateNow,5,2),'/',substr(dateNow,1,2)) (a(2),a,a(2),a,a(2)); put skip edit (substr(timeNow,1,2),':',substr(timeNow,3,2),':',substr(timeNow,5,2),'.',substr(timeNow,7,3)) (a(2),a,a(2),a,a(2),a,a(3)); put skip list (''); unspec(cmdLine_ptr) = '0080'b4; put edit ('command line = ', cmdLine) (a); put skip list (''); unspec(base_page_ptr) = '0000'b4; put edit ('PSP segment = ', unspec(base_page.psp_seg),'h') (skip,a,b4(4),a); put skip list (''); i = length(cmdArgs); put edit ('cmdArgs = ', cmdArgs) (a); put skip list (''); put list ('env = ', envBlk); i = '12bc'b4; put edit ('i = ',unspec(i),'h') (skip,a,b4(4),a); return; /* just for aesthetics */ end; /* of main program */
LV Anyone know why this page was created? Generally someone adds a note giving us some context.
escargo - I'm especially mystified because they got the name of the language wrong (it's PL/I). There is work being done on a PL/I front end to the GNU C compiler; I understand that they are looking for language samples to compile. - RS Thirty years ago, I did some PL/I (or, rather, the "student" subset SL/I) on an IBM 1130... but is PL/I any more than a museum piece today? Long time ago, it was praised as fusion of Fortran and Algol, with some COBOLity thrown in :^) KPV PL/I was the first real language I learned twenty five years ago. Don't remember much of the language except that I remember that C seemed trivial afterwards.
escargo I was an operator for an 1130 more than 30 years ago. I always had a fondness for the card reader/punch. (Makes me wonder if there are any 1130 simulators out there somewhere.) - RS: see http://ibm1130.org/sim
LV Well, I know at least one company which has production code written in PL/I... several hundred thousand lines of code, as a matter of fact. I don't know about other sites.
VK FWIW I consider this page is just off-topic here. No Tcl content, waste of reader's time. Just adding irrelevant information will not do anything good.
CLN I've never worked in PL/I (PL/1) myself but I remember someone once telling me about PL/C (PL/I for College students) which, he claimed, tried so hard to give a compiler warning and guess what the user meant that it would compile a Shakespearean sonnet. ;-)
VK so that PL/1 forgives much errors, could be interesting... but I still fail to understand why this discussion belong here. To continue off-topic, here my PL/1 chunk of correct code of interest:
if then then then=else; else else=then;
OTOH I must ask for wiki gnomes to delete this entire page! (I am too shy to do this myself)
TP VK's example shows off PL/I's purposeful lack of reserved words. Not every PL/I compiler supported this feature, but it was certainly present in the PL/I compilers that I used (IBM PL/I Optimizing compiler & PL/I C). Instead of reserved words, the compiler parsed purely by context. Other interesting features that I remember using:
I don't see the controversy of having a PL/I page on the Tcl wiki. Since it is now a GCC front-end language, someone could conceivably write a Tcl extension with PL/I. Note that the wiki already has pages for Cobol, Fortran, APL, Smalltalk, Haskell, Basic, and other languages that may not have a direct relationship with Tcl.
LV VK, alas, the gnomes can't delete the page - the best we can do is delete the contents. As for the controversy, if I knew why the original creator put the code on this page, I'd have some opinion about whether to delete the page or not ;-)
escargo - Does anybody see what's being done in the PL/I code to be able to write the equivalent in Tcl?
VK Chunk of code here mostly demostrates variables declarations; this program essentially does nothing: it outputs date and time, in raw format first, then in edited format ('put skip edit' line), then outputs program arguments. It contains only single comment /* just for aesthetics */ which is just not wise (actually this is a good example of bad commenting style). Sample code does not look good even for language demonstration purposes, looks like someone's test program: its named mytest, what do you want from it? It is not even PI calculation! I dislike it. Garbage!
PL/1 is happen to be my very first language, and its time is now long in the past. Interestingly, other languages from that time survived better. I meant LISP among interesting ones, which is very interesting from Tcl perspective. Even Fortran deserves more attention, as there are many scientific libraries working with it.
escargo - To me this says that something has displaced PL/I, something better. That leads to the question of, "Better how?" Comparing this to Lisp and Fortran, saying that PL/I's popularity did not endure so well, one may ask, "How can Tcl fare better than PL/I did?" Is there anything that we can do for Tcl to help it retain what popularity it has?