You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

23 lines
391 B

5 years ago
  1. template Main() {
  2. signal input in;
  3. signal output out[2];
  4. // First play with variables;
  5. var c = 3;
  6. var d = c--; // d --> 3
  7. var e = --c; // e --> 1
  8. out[0] <== in + e; // in + 1
  9. // Then play with signals
  10. c = in;
  11. d = c--; //d <-- in;
  12. e = --c; // d <-- in-2
  13. out[1] <== in + e; // 2*in -2
  14. }
  15. component main = Main();