identification division.
program-id. fileplot.
* aus Wirth, systematisches Programmieren p. 76
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 i pic x.
working-storage section.
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 value space.
77 aster pic x value '*'.
77 crlf pic x(2) value '1013'.
procedure division.
* computes x / y
move 0 to i.
open input f
perform until 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
perform until 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.15 Sekunden
(vorverarbeitet)
¤
|
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.
|