products/sources/formale Sprachen/Cobol/verschiedene-Autoren/Bell-Labs image not shown  

Quellcode-Bibliothek

© Kompilation durch diese Firma

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

Datei: sample.cob   Sprache: Cobol

Original von: verschiedene©

       Identification Division.
       Program-Id. sample.
       Author"Heintze/Jaffar/Voicu".
      * ".. Combining Analysis and Verification"  
       Data Division.
       Working-Storage Section.
      * variables
         77 x0 pic S9(8).
         77 y0 pic S9(8).
         77 x  pic S9(8).
         77 y  pic S9(8).
         77 s1 pic S9(8).
         77 s2 pic S9(8).
       Procedure Division.
      *  this is a sample from author
         move 0 to x0 x
         move 4 to y0 y
         perform until x >= y
           add 1 to x
           subtract 1 from y
           subtract 2 from x0
           add 2 to y0
      *    x + y = x0 + y0     
         end-perform  
      *  post
         compute s1=x+y
         compute s2=x0+y0
         Display "x="x" y="y
         Display "x+y="s1" x0+y0="s2
       End-Program sample.

¤ Dauer der Verarbeitung: 0.17 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