跳至內容

PL/I

維基百科,自由的百科全書
PL/I
編程範型過程式, 指令式, 結構化
設計者IBM與SHARE(英語:SHARE (computing))語言發展委員會
實作者IBM
釋出時間1964年,​61年前​(1964)
網站www.ibm.com/products/pli-compiler-zos 編輯維基數據鏈接
衍生副語言
PL/M(英語:PL/M), XPL(英語:XPL), PL/P(英語:PL/P), PL/C(英語:PL/C), PL/S(英語:IBM PL/S), PL/AS(英語:PL/AS), PL/X(英語:PL/X), PL/8(英語:PL/8), EPL[1]
受影響於
COBOL, Fortran, ALGOL
影響語言
SP/k(英語:SP/k), B語言, REXX, AS/400控制語言(英語:AS/400 Control Language)

PL/I(/piː ɛl wʌn/),源自編程語言一號(Programming Language One)的縮寫,一種過程式、指令式程式語言。由IBM公司在1960年代發明的第三代高級程式語言,用於IBM的MVS(英語:MVS)、或迪吉多的VAX/VMS等作業系統中。 在系統軟件,圖像,仿真,文字處理,網絡,商業軟件等領域均可應用。

樣例代碼

[編輯]

Hello world程序

[編輯]
Hello2: proc options(main);
    put list ('Hello, world!');
end Hello2;

查找字符串

[編輯]
/* Read in a line, which contains a string,
/* and then print every subsequent line that contains that string. */

find_strings: procedure options (main);
    declare pattern character (100) varying;
    declare line character (100) varying;
    declare line_no fixed binary;

    on endfile (sysin) stop;

    get edit (pattern) (L);
    line_no = 1;
    do forever;
        get edit (line) (L);
        if index(line, pattern) > 0 then
            put skip list (line_no, line);
        line_no = line_no + 1;
    end;

end find_strings;

引用

[編輯]
  1. ^ R. A. Frieburghouse. The Multics PL/1 Compiler. Multicians.org. [2023-01-26]. (原始內容存檔於2023-02-23). 
  2. ^ IBM Corporation. IBM Enterprise PL/I for z/OS, V5.3. IBM. [October 1, 2019]. (原始內容存檔於2020-07-28). 

外部連結

[編輯]