This toy example, which I believe is standard C code, is failing to compile in Zorro:
struct HIT {
int lower_barrier_hit, upper_barrier_hit;
char first_hit;
};
struct HIT compute_paths(vars x) {
struct HIT hit;
hit.lower_barrier_hit = 1;
hit.upper_barrier_hit = 2;
hit.first_hit = 'u';
return hit;
}
function run() {
vars price = series(priceClose());
struct HIT hit = compute_paths(price);
}
This gives:
Syntax error: Wrong type SETRETV:::STRUCT@16
< return hit; >