Si consideri il seguente modello Modelica:
class System Integer x; initial equation x = 0; equation when sample(0, 2) then x = 1 - pre(x); end when; end System;