|
Presentazione linguaggio COBOL
COBOL (Common Business Oriented Language) è stato uno dei più vecchi
linguaggi di programmazione ad alto livello.
Sviluppato nel 1959 da un gruppo di professionisti riuniti alla
Conference on Data Systems Languages (CODASYL).
Da allora ha avuto molte modifiche e miglioramenti. Nel tentativo di
superare le numerose incompatibilità tra le varie versioni, l'American
National Standards Institute (ANSI) annunciò uno standard nel 1968, che
produsse l'ASN-COBOL.
Nel 1974 venne pubblicata una revisione con molte funzioni che non erano
state previste nel '68.
Nel 1985 esce, sempre dall'ANSI, un'ulteriore revisione con nuove
funzioni.
Il linguaggio continua ad evolversi ancora oggi, che è disponibile in
una versione object-oriented inclusa nel COBOL 97.
Le funzioni principali del Cobol
-
The language
that automated business
-
Allows names to
be truly connotative - permits both long names (up to 30
characters) and word-connector characters (dashes)
-
Every variable
is defined in detail - this includes number of decimal
digits and the location of the implied decimal point
-
File records are
also described with great detail, as are lines to be output to a
printer - ideal for printing accounting reports
-
Offers object,
visual programming environments
-
Class Libraries
-
Rapid
Application Capabilities
-
Integration with
the World Wide Web
Aree applicative per Cobol
- ideale per la soluzione di esigenze gestionali aziendali (Business)
Esempi di programmi in Cobol:
1)
Hello world
000100 IDENTIFICATION DIVISION.
000200 PROGRAM-ID. HELLOWORLD.
000300
000400*
000500 ENVIRONMENT DIVISION.
000600 CONFIGURATION SECTION.
000700 SOURCE-COMPUTER. RM-COBOL.
000800 OBJECT-COMPUTER. RM-COBOL.
000900
001000 DATA DIVISION.
001100 FILE SECTION.
001200
100000 PROCEDURE DIVISION.
100100
100200 MAIN-LOGIC SECTION.
100300 BEGIN.
100400 DISPLAY " " LINE 1 POSITION 1 ERASE EOS.
100500 DISPLAY "Hello world!" LINE 15 POSITION 10.
100600 STOP RUN.
100700 MAIN-LOGIC-EXIT.
100800 EXIT.
|