Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/Cobol/verschiedene-Autoren/Wirth/   (Columbo Version 0.7©)  Datei vom 4.1.2008 mit Größe 1 kB image not shown  

Quelle  fileconvto.cob   Sprache: Cobol

 
       identification division.
       program-id. fileconvto.
      *  aus Wirth, systematisches Programmieren p. 100 
       author"JD".
       date-written. 25.10.2004.
       date-compiled.
       environment division.
       input-output section.
       file-control.
         select f assign to file-f
         status f-status.
       data division.
       file section.
        fd f
        record contains 120 characters
        data record is f-record
        label record is omitted.
        01 f-record.
          05 c pic x.
       working-storage section.
        78 n   pic 9(4) value 100.
        77 u   pic 9(4).
        77 i   pic 9(4).
        77 a   pic 9(4) occurs n.
        77 x   pic 9(4)V9(4).
        77 num pic 9(4)V9(4).
        77 f-status pic S9(4) comp.
       linkage section.
        77 e pic 9(4)V9(4).
       procedure division using e.
      * 0 <= e < 10**n
         move 0 to i
         move e to x
         perform until x = 0
      *    a1*10**0+ ... +ai*10*+(i-1)+10**i=e   
           divide x by 10 giving u
           add 1 to i
           compute a(i) = x - 10*u
           move u to x
         end-perform.
         open output f
         perform until i = 0
           compute c = function rep(a(i))
           write f-record
           subtract 1 from i
         end-perform.
         close f
        end-program fileconvto.

Messung V0.5
C=94 H=100 G=96

¤ Dauer der Verarbeitung: 0.11 Sekunden  (vorverarbeitet)  ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

Beweissystem der NASA

Beweissystem Isabelle

NIST Cobol Testsuite

Cephes Mathematical Library

Wiener Entwicklungsmethode

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 und die Messung sind noch experimentell.