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 c pic x.
working-storage section.
77 x pic 9(4)V9(4).
77 num pic 9(4)V9(4).
77 f-status pic S9(4) comp.
linkage section.
77 v pic 9(4)V9(4).
procedure division using v.
* computes x / y
move 0 to x.
open input f
read f into f-record
perform until (c < '0' or c > '9') or (f-status < 0)
compute num = c - '0'
compute x = 10*x + num
read f into f-record
end-perform.
close f
end-program fileplot.
¤ Dauer der Verarbeitung: 0.16 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.
|