Skip to content

Instantly share code, notes, and snippets.

@h4ck3rk3y
Created April 21, 2016 09:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save h4ck3rk3y/b3b44ba70fdebd205b847eab5e103f5f to your computer and use it in GitHub Desktop.
Save h4ck3rk3y/b3b44ba70fdebd205b847eab5e103f5f to your computer and use it in GitHub Desktop.
_swpints input parameter list [int b2b, int b2c]
output parameter list[int c2b, int c2c];
c2b<---b2c;
c2c<---b2b;
return [c2b, c2c];
end
_swprecs input parameter list [record #rec d5b, record #rec d2c]
output parameter list[record #rec d5c, record #rec d2b];
type int : b3;
[b3,b3]<--- call _swpints with parameters [b3,b3];
[d5d,d2b]<--- call _swpints with parameters [b3, d5c];
return [d2d, d2b];
end
_main
record #rec
type int : len;
type int : height;
endrecord;
type record #rec : b2;
type record #rec : d5b: global;
b2.len<---5;
b2.height <---7;
d5b.len <---10.56;
d5b.height <---20;
[b2, c2]<--- call _swprecs with parameters [b2,d5b];
write(b2);
write(c2);
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment