Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
PL/C
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== Dialect and features == PL/C, a large subset of PL/I, eliminated a few of the more complex features of PL/I β record I/O, list processing, multitasking, and the compile-time preprocessor.<ref name="PLCConwayWilcox"/> It added extensive debugging and error recovery facilities. PL/C was upwardly compatible with PL/I, meaning that a program that runs without error under the PL/C compiler should run under PL/I and produce the same results.<ref name="afips-plc">{{cite conference | author-first=Howard L. | author-last=Morgan | author2-first=Robert A. | author2-last=Wagner | year=1971 | contribution= PL/ C:βThe design of a high-performance compiler for PL/I | title= Proceedings of the May 18β20, 1971, spring joint computer conference (AFIPS '71 (Spring)) | publisher= Association for Computing Machinery | pages= 503β510 | doi=10.1145/1478786.1478858 | doi-access=free }}</ref> The only exception is if certain incompatible diagnostic features of PL/C were used. The PL/C compiler had the unusual capability of never failing to compile any program, through the use of extensive automatic correction of many syntax errors and by converting any remaining syntax errors to output statements. PL/C provided extensions to PL/I's own <code>CHECK</code> facility for flow tracing, and additionally provided new facilities, such as the <code>PUT ALL;</code> and <code>PUT ARRAY;</code> statements for printing the values of every scalar and every array variable at that point in the program.<ref name="conway-gries"/> PL/C also provided pseudo-comments, which could be used to conditionally turn on code based on options supplied in the PL/C job control card: <pre> *PL/C ID='JANE SMITH' COMMENTS=(2) ... /*2 PUT SKIP LIST('AT POINT Y, THE VALUE OF POPULATION IS', POPULATION); */ /*4 PUT ALL; */ ... </pre> The comments value shown here would result in the first <code>PUT</code> statement being "uncommented" and invoked during the run, while the second one whose number did not match would still be a comment. Pseudo-comments also provided a way to use PL/C-specific statements in an upwardly compatible way with PL/I, as in the second case, since the PL/I compiler would see them as comments only.<ref name="conway-gries"/> PL/C handles [[Floating-point arithmetic|floating point arithmetic]] by computing all [[Single-precision floating-point format|single-precision]] values as double precision, which can complicate attempts by the programmer to validate rounding behavior of particular computations.<ref>{{Cite book |last=Hull |first=T.E. |url=https://www.worldcat.org/oclc/3311037 |title=Portability of numerical software |publisher=Springer-Verlag |year=1977 |isbn=0-387-08446-0 |editor-last=Cowell |editor-first=Wayne |location=Berlin |pages=42 |chapter=Semantics of floating point arithmetic and elementary functions |oclc=3311037}}</ref> A simple example of PL/C's error repair has been presented as:<ref name="afips-plc"/> <pre> PUT LIST (A B) ERROR SY06 MISSING COMMA ERROR SY07 MISSING SEMI-COLON PL/C USES PUT LIST (A, B); </pre> While many cases such as this one can be successfully repaired, there are also cases where the repair does not achieve what the programmer likely intended.<ref name="PLCConwayWilcox"/> There were several other [[PL/I#Teaching_subset_compilers|education-related PL/I compilers]], including [[PLAGO]] from the [[Polytechnic Institute of Brooklyn]] and [[SP/k]] from the [[University of Toronto]], however they tended to use much more restricted subsets of PL/I, whereas PL/C supported almost the entire language.<ref name="nmsu-review"/><ref>{{cite journal | author-first=Richard C. | author-last=Holt| author2-first= David B. | author2-last=Wortman | title= SP/K (PL/1 Subset) compilers now available for 360/370 and PDP-11 | journal= SIGMINI Newsletter | volume= 1 | number= 1 | date=July 1975 | pages= 8β9 | doi=10.1145/1164857.1164862 | s2cid=29890098| doi-access=free }}</ref> And PL/C was the only PL/I educational dialect mentioned in languages expert [[Jean E. Sammet]]'s extensive survey of programming languages in use for 1976β77.<ref name="sammet-survey-76-77"/>
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)