肾虚型脱发是什么样子| 口干舌燥吃什么食物好| 6岁属什么生肖| 为什么广西女孩子好娶| 同房后为什么会出血| neg是什么意思| 超敏c反应蛋白高是什么意思| 护腕有什么用| 龙抬头是什么意思| 佛是什么意思| 什么时候买机票便宜| 牙龈是什么| 安五行属什么| 青岛属于什么气候| 怀孕肚子疼是什么原因| 张牙舞爪是什么生肖| 蒙古族的那达慕大会是在什么时候| 不生孩子的叫什么族| hn是什么意思| 拉肚子吃什么消炎药好| 饕餮是什么意思| 吃雪燕有什么好处| 请佛容易送佛难什么意思| 流明是什么意思| 后羿射日什么意思| 心脏长在什么位置| 卵泡刺激素高说明什么| 搞破鞋什么意思| 什么是三观不合| 女生肚脐眼下面疼是什么原因| 呕吐是什么原因引起的| 陈醋和蜂蜜一起喝有什么好处| 阑尾粪石是什么意思| 新生儿睡觉突然大哭是什么原因| 五十岁是什么之年| 红润润的什么| 琅琊榜是什么意思| 俊字五行属什么| 结婚25年属于什么婚| 骨赘形成是什么意思| 中秋节送礼送什么| 口腔溃疡是什么样子| 前列腺增生吃什么食物好| 氟利昂是什么味道| 血压低什么原因造成的| 槟榔中间的膏是什么| 紧迫感是什么意思| hpv感染什么症状| 白内障是什么引起的| 乙状结肠炎吃什么药| 清朝皇帝姓什么| fossil是什么牌子| 女人性冷淡用什么药| 轻度溶血是什么意思| 生物冰袋里面是什么| 减肥头晕是什么原因| 定坤丹适合什么人吃| 儿童便秘吃什么最快排便| 美国为什么不敢打朝鲜| 海参吃了有什么好处| 慢阻肺吃什么药最有效最好| 头发掉要用什么洗发水| 什么惊什么怪| 腹痛拉稀什么原因| 血压太低有什么危害| hpv初期有什么症状女性| 烦恼的意思是什么| 叫什么| 生抽和酱油有什么区别| 吃什么好消化| 手指伸不直是什么原因| 两个务必是什么| 金字旁加匀念什么| 5是什么生肖| 高血压和高血脂有什么区别| 金樱子配什么才壮阳| 手痒是什么原因| 姓黑的都是什么族| 十三点是什么意思| 陈皮泡水喝有什么好处| 胃凉是什么原因| 2020年是什么生肖| 尿酸高是什么原因引起的| ader是什么牌子| 昵称什么意思| 胃火重口臭吃什么药好| xy是什么意思| 新生儿为什么有黄疸| 什么什么不同| 悦己是什么意思| 静脉血是什么颜色| 脚麻看什么科室最好| 骨折什么感觉| 鹿下面一个几字读什么| 属鸡本命佛是什么佛| 野鸡吃什么| 血小板压积偏高是什么原因| 动车跟高铁有什么区别| 西红柿对人体有什么好处| 五大发展理念是什么| 1970属什么生肖| 晚上吃什么水果减肥效果最好| 空字五行属什么| 长得标致是什么意思| 男孩子什么时候刮胡子| 龛是什么意思| 艾草有什么功效| 子宫内膜增厚有什么影响| 缺钾最忌讳吃什么| 随餐服用什么意思| 手指头红是什么原因| 手指头痒是什么原因| 弃猫效应是什么| 肾阴虚吃什么中成药| 12月15号是什么星座| 为什么嘴里发苦| d是什么单位| 紧急避孕药叫什么名字| 竹心泡水喝有什么功效| 血小板计数偏高是什么意思| 发烧了吃什么药| 盐吃多了有什么危害| 细胞质是什么| 一龙一什么| 孩子晚上睡觉磨牙是什么原因| 失眠吃什么中药调理效果快| 甘露醇治什么病| 希特勒为什么杀犹太人| 什么什么动听| 突然视力模糊是什么原因引起的| 心律失常是什么意思| 吃什么白细胞升的最快| 喝什么降火| 阴毛变白是什么原因| 国际章是什么意思| 有什么水能代替美瞳水| 03年属什么生肖| 什么是戒断反应| 汇报是什么意思| 什么是宇宙| 地中海贫血是什么病| 四十年是什么婚| 砖茶是什么茶| 有什么工作| 什么是动脉瘤| 鸡子是什么东西| 狗狗体内驱虫用什么药最好| 阴道口发白是什么原因| 甲钴胺片主要治什么病| 尿液突然变深褐色是什么原因| 甘草有什么功效| 什么茶降火| 脚浮肿是什么原因引起的| 蛇缠腰是什么病| 常乐我净是什么意思| 15号来月经排卵期是什么时候| 关东煮是什么| 璇字五行属什么| 什么是磁场| 什么是零和博弈| 低密度脂蛋白高的原因是什么| 什么动物站着睡觉| 水猴子是什么动物| 茶走是什么意思| 女孩叫兮兮是什么意思| 膈应是什么意思| 赵丽颖原名叫什么| 肾阴虚的表现是什么| 筋膜炎挂什么科| 移动迷宫到底讲的什么| 周角是什么| 高山茶属于什么茶| 腰困是什么原因| afar是什么意思| cmv病毒是什么病毒| 舒张压偏低是什么原因| 蚕蛹是什么| 透明的什么填词语| 肾结石是因什么而起| 隐翅虫长什么样子| 杉字五行属什么| 奶粉中的opo是什么| 轧戏什么意思| 看心脏挂什么科| 什么是子宫内膜异位症| 糠是什么东西| eps是什么意思| 喝咖啡心慌是什么原因| 既寿永昌什么意思| 什么样的毛刺是良性的| 什么样的树| 什么情况需要做肠镜| 中枢是什么意思| 肌醇是什么| furk是什么意思| 八卦分别代表什么| 鸡枞菌生长在什么地方| 医德是什么| 女人喜欢什么姿势| 狗狗细小是什么症状| 牙槽骨吸收是什么意思| 耳朵蝉鸣是什么原因引起的| 小孩子上火吃什么能降火| 头大适合什么发型| ga是什么意思| 甲方乙方是什么意思| 氢化植物油是什么| 什么是本命年| Mo什么元素| 怀孕前三个月不能吃什么| 周围神经病是什么病| qcy是什么牌子| 胎停会有什么症状| 指甲变空是什么原因| 什么是断掌| 擦汗表情是什么意思| 九月有什么节日| blissful是什么意思| 小孩用脚尖走路是什么原因| 煜什么意思| 老鼠疮是什么病| 梦见打官司预示着什么| 凉面是用什么面做的| 子宫切除有什么影响| 灵芝对身体有什么好处| 把脉能看出什么| 吃什么药能快速降血压| 枸杞加什么泡水喝壮阳| 夏天什么时候结束| 牙龈上火吃什么药| 五行缺什么查询免费| 彩照是什么底色| 避孕药有什么副作用| 一直头疼是什么原因| 脚板痒是什么原因| 脑梗输液用什么药| 借鸡生蛋是什么意思| 9月13日是什么日子| 医助是什么工作| 一什么椅子| 脊髓炎吃什么药| 皮肤黑的人适合穿什么颜色的衣服| 咯血是什么意思| 前列腺炎吃什么药最有效| 杏鲍菇炒什么好吃| 思想包袱是什么意思| 爱是什么结构| 骨髓瘤是什么原因引起的| 什么材质的拖鞋不臭脚| 目赤是什么症状| 视黄醇结合蛋白是什么| 房性早搏什么意思| 祸从口出什么意思| 锅烧是什么| ti什么意思| se是什么意思| beauty是什么意思| 中暑用什么药| 什么的被子| 冷暴力是什么| 千千阙歌是什么意思| 怀女孩有什么征兆| 儿童肚子痛吃什么药| 大姨妈来吃什么好| 百度Jump to content

清明期间江苏高速日均出口流量预计增7%

From Wikipedia, the free encyclopedia
百度 杨伟认为,既然有了最强的装备,就要把这个装备在实战过程中用到最关键的地方,发挥举足轻重的作用。

The PL/I preprocessor is the preprocessor for the PL/I computer programming language. The preprocessor interprets a subset of the full PL/I language to perform source file inclusion, conditional compilation, and macro expansion.

The preprocessor language has a PL/I-like syntax with preprocessor statements and preprocessor procedures prefixed with a percent symbol (%). Listing-control statements, which supply formatting commands for the compiler listing, are usually considered preprocessor statements and also begin with %. Preprocessor statements are imbedded in and operate on input text. The input text is normally a PL/I program, but is agnostic to the grammar of PL/I, so the preprocessor can also be used independently to process other kinds of text files.

The preprocessor is not specified as part of standard PL/I, but most PL/I implementations accept the language of the IBM preprocessor.

Including files

[edit]

The %INCLUDE preprocessor statement is used to include the text of another file, which may also contain preprocessor directives. The latest IBM compilers also provide an %XINCLUDE directive, which has the effect of including the specified file only if it has not already been included. %INSCAN and %XINSCAN operate similarly, except that the name of the file to be included is specified by a preprocessor expression.

Listing control

[edit]

Listing control statements provide instructions for formatting both the listing generated by the preprocessor and the listing generated by the compiler.

  • %PRINT; causes the printing of listings of the following text to be started or resumed.
  • %NOPRINT; causes the printing of the listings of the following text to be suppressed.
  • %PAGE; causes a new page to be started in the listings.
  • %SKIP [(n)]; causes n lines to be skipped in the listings. If n is omitted the default is one line.
  • %PUSH, %POP save and restore the current status of %PRINT/%NOPRINT on a pushdown stack and restore it, respectively.

Preprocessor operation

[edit]

The preprocessor operates by scanning the input text and recognizing declared preprocessor names, also called preprocessor identifiers. The text is copied to the preprocessor output with the preprocessor names replaced with their current values. The name may represent a call to a preprocessor procedure (macro). Replacement text may be rescanned by the preprocessor for possible additional replacement.

Preprocessor data types

[edit]

Preprocessor data may be declared to be CHARACTER, a character string with no maximum length, or FIXED an integer number of up to five decimal digits. A preprocessor builtin is a predefined procedure operating on preprocessor data. A preprocessor expression is an expression consisting only of preprocessor names, references to preprocessor procedures or builtins, and decimal or character constants. There are no BIT variables, but a BIT result may be obtained by comparison. The expression in %IF evaluates to BIT. All PL/I operators are allowed except exponentiation.

Preprocessor statements

[edit]
  • %DECLARE establishes an identifier as a preprocessor variable, either CHARACTER or FIXED.
  • %assignment assigns a value to a preprocessor identifier.
  • %ACTIVATE makes a preprocessor identifier active, that is, eligible for replacement when encountered in the input text.
  • %DEACTIVATE makes a preprocessor ineligible for replacement.
  • %DO heads a preprocessor DO-group, which is used to group statements and possibly specify iteration. A preprocessor DO-group can contain any combination of preprocessor statements and input text.
  • %PROCEDURE heads a preprocessor procedure, a set of preprocessor statements that functions as a macro returning a value when its name is encountered in the input text.
  • %SELECT heads a preprocessor SELECT-group.
  • %END terminates a preprocessor DO-group, SELECT-group, or preprocessor procedure.
  • %GOTO (or %GO TO) causes the preprocessor to continue its scan at the specified preprocessor label, either a preprocessor statement or an arbitrary point in the input text.
  • %IF controls the flow of the preprocessor scan according to the value of a preprocessor expression.
 %IF preprocessor-expression
 %THEN preprocessor unit1
 %ELSE preprocessor-unit2

The preprocessor-units can be any single preprocessor statement or a preprocessor DO-group.

  • %ITERATE transfers control to the %END of the containing preprocessor DO-group, ending the current iteration and beginning the next if needed.
  • %LEAVE terminates any remaining iterations of the containing preprocessor DO-group transfers control to the %END.
  • %NOTE generates a user-specified preprocessor diagnostic message.
  • %null is a preprocessor statement consisting only of an optional statement label and a semicolon (;). It does nothing, but serves as a place-holder where a required statement is not needed.
  • %REPLACE allows immediate replacement of a name by a character or fixed expression. The name does not have to be a declared preprocessor identifier.

Preprocessor procedures

[edit]

A preprocessor procedure is a subroutine executed by the preprocessor. The procedure is delimited by %PROCEDURE and %END statements and can contain only preprocessor statements, without the leading %. It is invoked as a function reference from open code, outside of any preprocessor procedure, or from another preprocessor procedure, and returns a CHARACTER or FIXED value. When the procedure is invoked from open code the arguments are passed by name, that is they are interpreted as character strings delimited by commas or a right parenthesis, all leading, trailing, or embedded blanks are significant and considered part of the argument.[1]:?pp.508–509?

Preprocessor built-ins

[edit]

These are the built-ins for IBM's PL/I for MVS and VM compiler.[2]:?pp.404–406? There can be considerable difference in the built-ins provided among preprocessors of various PL/I compilers.

  • COMPILETIME — returns the date and time of compilation as a character string such as "15 SEP 12 15:30:00" for September 15, 2012 3:30PM (local time).
  • COUNTER — returns a character string containing a number that is "00001" for the first call to COUNTER and increases by one for each subsequent call.
  • INDEX — same as PL/I builtin INDEX.
  • LENGTH — same as PL/I builtin LENGTH.
  • PARMSETPARMSET(p) returns '1'b if the argument p was set in the current call to this preprocessor procedure, otherwise '0'b.
  • SUBSTR — same as PL/I builtin SUBSTR.

Example

[edit]

The following example for IBM PL/I for OS/2 illustrates the use of a preprocessor procedure to implement a C-like write statement for PL/I.[3] The procedure would be called by coding the statement uwrite file(filename) from(varying_string) count(byte_count); Byte_count is optional and defaults to the length of varying_string if omitted.

 %uwrite:
 procedure keys (File, From, Count);

 dcl (File, From, Count, Number, Size) char;

 if parmset(File) & parmset(From) then; else do;
    note ('FILE and FROM must be specified!', 12);
    return;
    end;

 if parmset(Count)
    then Size = 'min(length(' || From || '), ' || Count || ')';
    else Size = 'length(' || From || ')';

 Number = Counter();
 ans ('do;');
 ans ('dcl Count' || Number || ' fixed bin (15);' ) skip;
 ans ('Count' || Number || ' = filewrite('
                        || File
                        || ', ptradd(addr(' || From || '), 2)'
                        || ', ' || Size
                        || ');') skip;
 ans ('end;') skip;

 %end;
 %act uwrite;

The statement uwrite file(file_name) from(var_str) count(64); generates the following:

 do;
 dcl Count00001 fixed bin (15);
 Count00001 = filewrite(file_name, ptradd(addr(var_str), 2), min(length(var_str), 64));
 end;

Evolution

[edit]

A 1964 report on "NPL",[4]:?pp.109–114? as PL/I was called at the time, provided that macro procedures, identified by the keyword MACRO, could use the complete facilities of the language. The following compile-time statements were allowed in open code:

  • %DECLARE – both fixed-length and varying character strings were defined.
  • %assignment
  • %null statement
  • %IF compile_time_comparison THEN unit [ELSE unit] – this causes one or the other unit to be included in the source.
  • %GOTO

"NPL" as defined in this manual was never implemented.

In 1965 an update to IBM's PL/I Language specification defined an even less ambitious preprocessor language.[5]:?pp.131–133? All mention of preprocessor procedures was omitted. The following compile-time statements were specified:

  • %DECLARE
  • %assignment
  • %null statement
  • %IF compile_time_comparison THEN GOTO label – No ELSE clause was defined.
  • %GOTO

This language specification was again never implemented, however a 1966 revision of this manual restored preprocessor procedures with the now-current %PROCEDURE ... %END syntax and brought the specification close to what was actually included in PL/I(F).[6]:?pp.132–139?[7]:?pp.154–162? Fixed-length character variables were gone. New statements added were:

  • %ACTIVATE
  • %DEACTIVATE
  • %DO [preprocessor_variable = preprocessor_expression TO preprocessor_expression [BY preprocessor_expression]]
  • RETURN in a compile-time procedure only.
  • %INCLUDE
  • %IF – the %IF compile_time_comparison %THEN unit [%ELSE unit] was restored.

A single compile-time builtin, SUBSTR, was added.

Also in 1966 Robert Rosin published a pair of articles[8][9] discussing development of the preprocessor. This development was based in a "SHARE XXVI Memo" from earlier the same year and a paper by Mark Elson. Rosin credits MAD as the only previous example of a macro processor in a high-level language.

See also

[edit]

References

[edit]
  1. ^ IBM Corporation (2005). Enterprise PL/I for z/OS PL/I for AIX WebSphere Developer for zSeries PL/I for Windows Language Reference (PDF).
  2. ^ IBM Corporation (1995). IBM PL/I for MVS & VM Language Reference.
  3. ^ Sturm, Eberhard. "UIO-Makros für Builtin-Funktionen fileread und filewrite". Retrieved January 22, 2012.
  4. ^ IBM Corporation (1964). NPL Technical Report (PDF).
  5. ^ IBM Corporation (1965). IBM Operating System/360 PL/I: Language Specifications (C28-6571-1) (PDF).
  6. ^ IBM Corporation (1966). IBM Operating System/360 PL/I: Language Specifications (C28-6571-3) (PDF).
  7. ^ IBM Corporation (1969). IBM System/360 PL/I Reference Manual (C28-8201-3) (PDF).
  8. ^ Rosin, Robert (August 1966). "PL/I Macro Processor - Progress Report" (PDF). PL/I Bulletin (2). Retrieved January 22, 2013.
  9. ^ Rosin, Robert (August 1966). "Macros in PL/I" (PDF). PL/I Bulletin (2). Retrieved January 22, 2013.
[edit]
胃痉挛吃什么药最有效 冰粉是什么做的 六合什么意思 什么是僵尸恒星 天秤座属于什么星象
过敏性紫癜千万不能用什么药 新生儿一直哭闹是什么原因 月经提前是什么原因 什么是弱视 细胞质由什么组成
黄体回声是什么意思 尿酸高是什么原因引起的 心悸是什么 多喝酸奶有什么好处 菜籽油是什么油
新西兰用什么货币 七月十日是什么星座 身上发抖是什么原因 形而上学什么意思 抗体弱阳性是什么意思
猪笼入水是什么意思aiwuzhiyu.com 吃金蝉有什么好处hcv8jop4ns8r.cn 脑软化灶是什么意思hcv7jop9ns1r.cn 秋葵是什么hcv8jop7ns2r.cn 梦见着火了是什么征兆shenchushe.com
维生素c补什么xjhesheng.com 簋是什么hcv9jop6ns5r.cn 人为什么会过敏wuhaiwuya.com 翻车鱼为什么叫翻车鱼hcv8jop7ns9r.cn 抽筋是什么原因引起的hcv8jop4ns4r.cn
什么情况下要做肠镜检查imcecn.com 益气是什么意思hcv9jop5ns7r.cn 多多益善什么意思hcv9jop6ns7r.cn 什么水果养胃又治胃病onlinewuye.com 喉结不明显的男生是什么原因hcv9jop0ns0r.cn
荔枝肉是什么菜系hcv8jop9ns5r.cn gmp是什么意思hcv8jop7ns7r.cn 日久生情什么意思hcv7jop9ns5r.cn 养生是什么意思hcv7jop9ns9r.cn 人缺钾有什么症状mmeoe.com
百度