identification division.
program-id. fsm.
* aus Dirk Hoffmann,
* Software-Qualität
* p340ff, Springer 2008
author. "JD".
date-written. 28.1.2009.
date-compiled.
data division.
working-storage section.
78 V-INITIAL value 0.
78 V-EOF value -1.
77 state pic S9(4).
77 acce pic S9(4).
77 c pic S9(4).
linkage section.
77 r pic S9(4).
procedure division returning r.
move V-INITIAL to state.
perform with test after until c= V-EOF
move function next-character to c
if c not = V-EOF then
move function next-state(c, state) to acce
end-if
end-perform.
move acce to r
end program fsm.
¤ 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.
|