public Rotate: () ==> ()
Rotate () ==
(-- propagate the rotation to the next component -- and tell it where our latch position is
next.Rotate(latch_pos); -- update our own latch position and take the -- alphabet size into account if latch_pos = alph.GetSize() then latch_pos := 1 else latch_pos := latch_pos+1; -- update the transpositioning relation by -- shifting all indices one position
config := {alph.Shift(i) |->
alph.Shift(config(i)) |
i insetdom config}; -- remember the rotation
latch_lock := true) preisofclass(Rotor,next) or isofclass(Reflector,next);
public Rotate: nat ==> ()
Rotate (ppos) == -- compare the latch position and the lock if ppos = latch_pos andnot latch_lock -- perform the actual rotation then Rotate() -- otherwise reset the lock else latch_lock := false pre ppos inset alph.GetIndices();
end Rotor
Messung V0.5
¤ Dauer der Verarbeitung: 0.10 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 und die Messung sind noch experimentell.