In C, you tackel the problem of only returning 1 variable from a function with pointers.
Example of problem:
x=0
y=10
x=ModifyXY(x,y)
print x
print y
.....
function ModifyXY(x,y)
x=x+5
y=0
endfunction x
The screen will display that x=5 and y=10, not y=0
This is tackled by passing the "label" in RAM of the variables. In the function, you go to where the label is pointing and change that place in RAM directly, instead of creating temporary variables to return a value.
int *x=0;
int *y=10;
ModifyXY(&x, &y);
printf("%d \n", x);
printf("%d", y);
.....
ModifyXY(*x,*y){
*x=*x+5;
*y=0;
}
This will actually report that x=5 and that y=0!
Any way to do this in DB?