PL/I

維基百科,自由的百科全書
PL/I
編程範型過程式, 指令式, 結構化
設計者IBMSHARE英語SHARE (computing)語言發展委員會
實作者IBM
面市時間1964年,​60年前​(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/p ɛ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). 

外部連結[編輯]