int
zeroindex(int *arr, int index)
{
arr[index] = 0;
}
We can use an abstract like
int
zeroindex(int *arr, int index) ~ [
setup: arr = .clump(sizeof(int)) - index;
arr[index] = 0;
];
A more complex example is as follows:
zeroall(int *arr, int len) ~ [
int i;
setup: arr = .clump(sizeof(int)*len);
for (i = 0; i < len; i++) {
arr[i] = 0;
}
]{
int i;
for (i = 0; i < len; i++) {
arr[i] = 0;
}
}
This seems sufficiently expressed in
We can use an abstract like
A more complex example is as follows: