All pastes #353930 Raw Edit

Miscellany

public text v1 · immutable
·published 2007-02-13 17:43 UTC
rendered paste body
PROC invertplus(CHAN INT in.0?, in.1?, reset?, out!, CHAN BOOL in.bool?, out.bool!)
  WHILE TRUE
    SEQ
      BOOL a:
      a := FALSE
      INT tmp:
      PRI ALT
        reset ? tmp
          IF
            a = TRUE
              a := FALSE
            a = FALSE
              a := TRUE
        SKIP
          IF
            a = FALSE
              INT int.0, int.1:
              SEQ
                PAR
                  in.0 ? int.0
                  in.1 ? int.1
                out ! int.0 + int.1
            a = TRUE
              INT int.0, int.1:
              SEQ
                PAR
                  in.0 ? int.0
                  in.1 ? int.1
                out ! int.0 - int.1
: