Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Special pages
Niidae Wiki
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
PL/I
(section)
Page
Discussion
English
Read
Edit
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
View history
General
What links here
Related changes
Page information
Appearance
move to sidebar
hide
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!
====Preprocessor==== {{Further|PL/I preprocessor}} The first IBM ''Compile time [[preprocessor]]'' was built by the IBM Boston Advanced Programming Center located in Cambridge, Mass, and shipped with the PL/I F compiler. The <code>%INCLUDE</code> statement was in the Standard, but the rest of the features were not. The DEC and Kednos<ref name="kednos" /> PL/I compilers implemented much the same set of features as IBM, with some additions of their own. IBM has continued to add preprocessor features to its compilers. The preprocessor treats the written source program as a sequence of tokens, copying them to an output source file or acting on them. When a % token is encountered the following compile time statement is executed: when an identifier token is encountered and the identifier has been {{tt|DECLARE}}d, {{tt|ACTIVATE}}d, and assigned a compile time value, the identifier is replaced by this value. Tokens are added to the output stream if they do not require action (e.g., <code>+</code>), as are the values of ACTIVATEd compile time expressions. Thus a compile time variable {{tt|PI}} could be declared, activated, and assigned using <code>%PI='3.14159265'</code>. Subsequent occurrences of {{tt|PI}} would be replaced by <code>3.14159265</code>. The data type supported are <code>FIXED DECIMAL</code> integers and {{tt|CHARACTER}} strings of varying length with no maximum length. The structure statements are: * {{code|%[label_list:]DO iteration: statements; %[label_list:]END;|rexx}} * <code>%procedure_name: PROCEDURE (parameter list) RETURNS (type); statements...; %[label_list:]END;</code> * {{code|%[label_list:]IF...%THEN...%ELSE..|rexx}} and the simple statements, which also may have a {{code|[label_list:]}} * {{code|%ACTIVATE(identifier_list)}} and {{code|%DEACTIVATE}} * ''assignment'' statement * <code>%DECLARE identifier_attribute_list</code> * <code>%GO TO label</code> * <code>%INCLUDE</code> * ''null'' statement The feature allowed programmers to use identifiers for constants{{snd}} e.g., product part numbers or mathematical constants{{snd}} and was superseded in the standard by named constants for computational data. Conditional compiling and iterative generation of source code, possible with compile-time facilities, was not supported by the standard. Several manufacturers implemented these facilities.
Summary:
Please note that all contributions to Niidae Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Encyclopedia:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Search
Search
Editing
PL/I
(section)
Add topic