덕근닷컴 by yunskorea

test

2008년 2월 19일 화요일

프로그래밍 언어 - PL/I


PL/I (숫자 1이 아니라 영문자 I를 쓰고, 읽는건 One으로 읽는다.)는
1965년 IBM에 의해 탄생하였고, 구조적 프로그래밍 방법을 사용한다.

당시 과학 기술 계산용 언어인 FORTRAN과 사무처리용으로 만들어진 코볼 언어의 기능을 모두 수용하여,
하나의 언어로 모든 종류의 프로그램을 만들기 위해 탄생되었다고 한다.

아래 2개의 샘플 프로그램 소스를 올려본다.



Hello world program
Hello2: proc options(main);
    put list ('Hello, world!');
end Hello2;


Search for a string
FINDSTRINGS: PROCEDURE OPTIONS(MAIN)
  /* READ A STRING, THEN PRINT EVERY */
  /* SUBSEQUENT LINE WITH A MATCH */
  DECLARE PAT VARYING CHARACTER(100),
         LINEBUF VARYING CHARACTER(100),
         (LINENO, NDFILE, IX) FIXED BINARY;
  NDFILE = 0; ON ENDFILE(SYSIN) NDFILE=1;
  GET EDIT(PAT) (A);
  LINENO = 1;
  DO WHILE (NDFILE=0);
  GET EDIT(LINEBUF) (A);
  IF LENGTH(LINEBUF) > 0 THEN DO;
     IX = INDEX(LINEBUF, PAT);
     IF IX > 0 THEN DO;
       PUT SKIP EDIT (LINENO,LINEBUF)(F(2),A)
     END;
  END;
  LINENO = LINENO + 1;
  END;
END FINDSTRINGS;


PL/I ("Programming Language One") is an imperative computer programming language designed for scientific, engineering, and business applications. It is one of the most feature-rich programming languages and one of the very first in the highly-feature-rich category. It has been used by various academic, commercial and industrial users since it was introduced in the early 1960s, and is still actively used today.

History of PL/I
PL/I was developed by IBM, at its Hursley Laboratories in the United Kingdom, as part of the development of System/360. Prior to System/360, IBM made several different incompatible models of mainframes for different purposes: some were designed for business use, others for scientific use. The goal of the System/360 project was to develop one series of compatible models to replace all the previous models, and which could be used equally well for commercial or scientific use.
http://en.wikipedia.org/wiki/PL/I

댓글 없음:

댓글 쓰기

가장 많이 본 글