identification division.
program-id. div.
* aus FME2008, small projects
* von Pradella/Morzenti/San Pietro
* " ... descriptive versus operational ..."
author. "JD".
date-written. 15.11.2008.
date-compiled.
data division.
working-storage section.
77 counter pic 9(4).
77 switch pic 9(4).
88 son value 1.
88 soff value 2.
procedure division.
* computes x / y
display "start"
move 0 to counter.
set soff to true.
if counter=0 and not on then set counter to 0
else if counter=0 and on then set counter to 5
else if counter=1 and on then set counter to 5
else if counter=1 and not on and not off then set counter to 0
else if counter=5 and on then set counter to 5
else if counter=5 and off then set counter to 0
else if counter=4 and off then set counter to 0
else if counter=4 and on then set counter to 5
else if counter=4 and not on and not off then set counter to 3
else if counter=3 and off then set counter to 0
else if counter=3 and on then set counter to 5
else if counter=3 and not on and not off then set counter to 2
else if counter=2 and off then set counter to 0
else if counter=2 and on then set counter to 5
else if counter=2 and not on and not off then set counter to 1.
display "finished"
end-program div.
¤ Dauer der Verarbeitung: 0.25 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.
|