identificationdivision. program-id. fileplot. * aus Wirth, systematisches Programmieren p. 76 author. "JD". date-written. 25.10.2004. date-compiled. environmentdivision. input-outputsection. file-control. select f assignto file-f status f-status. datadivision. filesection. fd f recordcontains 120 characters datarecordis f-record labelrecordisomitted.
01 f-record.
05 i pic x. working-storagesection.
78 d pic 9(4)V9(4) value 0.03125.
78 s pic 9(4) value 50.
78 h pic 9(4) value 65.
78 c pic 9(4)V9(4) value 6.28318.
77 x pic 9(4)V9(4).
77 y pic 9(4)V9(4).
77 i pic 9(4).
77 n pic 9(4).
77 temp1 pic 9(4).
77 temp2 pic 9(4).
77 f-status pic S9(4) comp.
77 blanc pic x valuespace.
77 aster pic x value'*'.
77 crlf pic x(2) value'1013'. proceduredivision. * computes x / y move 0 to i. openinput f performuntil i = 128 compute x = i * d compute temp1 = -x compute temp2 = c*x compute y = function exp(temp1) * function sin(temp2) compute n = s * y + h performuntil n = 0 write f-record from blanc subtract 1 from n end-perform write f-record from aster write f-record from crlf add 1 to i end-perform. close f end-program fileplot.
¤ Dauer der Verarbeitung: 0.26 Sekunden
(vorverarbeitet)
¤
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.