Mercurial > hg > Gears > GearsAgda
comparison src/parallel_execution/examples/Mult.cbc @ 355:45afe5d70956
Fix
author | Tatsuki IHA <innparusu@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Thu, 22 Jun 2017 16:20:56 +0900 |
parents | b07078bd1f2c |
children |
comparison
equal
deleted
inserted
replaced
354:6dcf6f909e15 | 355:45afe5d70956 |
---|---|
1 #include "../../context.h" | 1 #include "../../context.h" |
2 #include <stdio.h> | 2 #include <stdio.h> |
3 __code mult(struct Integer* input1, struct Integer* input2, __code next(struct Integer* output, ...)) { | 3 __code mult(struct Integer* input1, struct Integer* input2, __code next(struct Integer* output, ...)) { |
4 struct Integer* output = *O_output; | 4 struct Integer* output = *O_output; |
5 output->value = input1->value * input2->value; | 5 output->value = input1->value * input2->value; |
6 printf("%d + %d = %d\n", input1->value, input2->value, output->value); | 6 printf("%d * %d = %d\n", input1->value, input2->value, output->value); |
7 *O_output = output; | 7 *O_output = output; |
8 goto meta(context, next); | 8 goto meta(context, next); |
9 } | 9 } |
10 | 10 |
11 __code mult_stub(struct Context* context) { | 11 __code mult_stub(struct Context* context) { |