Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/Delphi/Bille 0.71/__history/     Datei vom 4.0.2013 mit Größe 27 kB image not shown  

SSL gcd.cob.bak  Sprache: unbekannt

 
Spracherkennung für: .bak vermutete Sprache: Abap {ABAP[93] VDM[75] VHDL[65]} [Methode: maximale Elemente, drei Dimensionen]

      *------------------------------------------
      * berechne gcd von m und n
      * Softwaretechnik Trends Band 44 Heft 4
      *------------------------------------------
       Identification Division.
       Program-Id. GCD.
       Author. Andreas Spillner/HS-Bremen.
       Data Division.
       Working-Storage Section.
         77 r           pic 9(4).
       Linkage Section.
         77 n           pic 9(4).
         77 m           pic 9(4).
         77 result      pic 9(4).
       Procedure Division using x, y, z returning result.
      * Beispiel mit Fehler!
      *
      * pre: m>0 and n>0
      * post: return >0 and
      * m@pre.mod(return) = 0 and
      * ...
        if n>m then
          move m to r
          move n to m
          move r to n
        end-if
        move function mod(m,n) to r
        perform until r not= 0 with test before
          move m to r
          move n to m
          move r to n
        end-perform
        move n to result
      * result wird zurückgegeben
       End-Program GCD.

[Verzeichnis aufwärts0.92unsichere VerbindungÜbersetzung europäischer Sprachen durch Browser2026-10-21]