products/sources/formale Sprachen/Delphi/Elbe 1.0/Auslieferung/Context IT/Samples/COBOL image not shown  

Quellcode-Bibliothek

© Kompilation durch diese Firma

[Weder Korrektheit noch Funktionsfähigkeit der Software werden zugesichert.]

Datei: zeitung.cob   Sprache: Cobol

       identification division.
       program-id. zeitung.
       author" aus dem Hamburger Abendblatt im November 2005".
       date-written. 5.11.2005.
       date-compiled.
       data division.
       working-storage section.
       77 c     pic 9(4).
       01 today.
         05 tt     pic 9(2).
         05 mm     pic 9(2).
         05 jjjj   pic 9(4).
       linkage section.
       77 x     pic 9(4).
       77 y     pic 9(4).
       77 z     pic 9(4).
       77 r1    pic 9(4).
       77 r2    pic 9(4).
       procedure division using y z r1 r2 returning x.
      *  berechnet eine dreistellige Zahl
         move 4 to c
         accept today from date
         if mm of today+tt of today > 
            mm of today+tt of today then
           move 5 to c.
         move z to x
         multiply 2 by x
         add 2 to x
         multiply 50 by x
         add c to x
         subtract y from x
         compute r1 = x / 100
         compute r2 = function mod(x, 100)
      *  Zahl ist x
      *  Ergebnis ist r1 r2
        end-program zeitung.

¤ Dauer der Verarbeitung: 0.25 Sekunden  (vorverarbeitet)  ¤





Download des
Quellennavigators
Download des
sprechenden Kalenders

in der Quellcodebibliothek suchen




Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.


Bemerkung:

Die farbliche Syntaxdarstellung ist noch experimentell.


Bot Zugriff